Re: DroopyLib
Posted: Fri Jun 22, 2012 7:41 am
i cant find UserLibUnicodeThreadSafe... in old 4.30 Droopy version it is present, in 4.61 version is not 

The version 4.30 is managed by Lexvictory.i cant find UserLibUnicodeThreadSafe... in old 4.30 Droopy version it is present, in 4.61 version is not
But you know how to make a very good and usefull libDroopy wrote:The version 4.30 is managed by Lexvictory.i cant find UserLibUnicodeThreadSafe... in old 4.30 Droopy version it is present, in 4.61 version is not
I don't know how to manage Unicode & ThreadSafe
Version supporting Unicode and ThreadSafe avalaible26/06/12 : Library 4.61.002
'Tailbite MultiLib Compile Mode' Unicode & ThreadSafe options can be checked in compiler options
First Compilation with PbFastLib 2
First version of the x64 version
Code: Select all
#Version$="200"
RegCreateKeyValue("HKEY_CURRENT_USER\SOFTWARE\Vendor\TestApp","Version",#Version$,#REG_SZ,".")
Code: Select all
Case #REG_SZ
GetHandle = RegSetValueEx_(hKey, ValueName, 0, #REG_SZ, @Value, Len(Value) + 1)
Code: Select all
Procedure.l GetProcessPID(Processname.s,CaseSensitive=#False) ; get PID from the Processname
;// Author : Fred
Protected Kernel32dll,CreateToolhelpSnapshot,ProcessFirst,ProcessNext,Process.PROCESSENTRY32,Snapshot,ProcessFound,Pid
Kernel32dll=OpenLibrary(#PB_Any, "Kernel32.dll")
If Kernel32dll
CreateToolhelpSnapshot = GetFunction(Kernel32dll, "CreateToolhelp32Snapshot")
CompilerIf #PB_Compiler_Unicode=0
ProcessFirst = GetFunction(Kernel32dll, "Process32First")
ProcessNext = GetFunction(Kernel32dll, "Process32Next")
CompilerElse
ProcessFirst = GetFunction(Kernel32dll, "Process32FirstW")
ProcessNext = GetFunction(Kernel32dll, "Process32NextW")
CompilerEndIf
If CreateToolhelpSnapshot And ProcessFirst And ProcessNext ; Ensure than all the functions are found
Process.PROCESSENTRY32\dwSize = SizeOf(PROCESSENTRY32)
Snapshot = CallFunctionFast(CreateToolhelpSnapshot, #TH32CS_SNAPPROCESS, 0)
If Snapshot <> #INVALID_HANDLE_VALUE
ProcessFound = CallFunctionFast(ProcessFirst, Snapshot, Process)
While ProcessFound
Debug PeekS(@Process\szExeFile)
If CaseSensitive
If PeekS(@Process\szExeFile)=Processname
Pid=Process\th32ProcessID
Break
EndIf
Else
If LCase(PeekS(@Process\szExeFile))=LCase(Processname)
Pid=Process\th32ProcessID
Break
EndIf
EndIf
ProcessFound = CallFunctionFast(ProcessNext, Snapshot, Process)
Wend
EndIf
CloseHandle_(Snapshot)
EndIf
CloseLibrary(Kernel32dll)
EndIf
ProcedureReturn Pid
EndProcedure
I know TB is ok, i just search how to return ascii or unicode string when necessary (according compiler options)There is nothing wrong with TailBite, you are using the ASCII versions of the Windows-API and your structure definition is wrong !