I am trying to execute a callback-routine via DLL, where I am passing the address of the callback-routine as parameter. The parameter is arriving at the DLL correctly, but when calling it (via Inline-Assembler-function CALL) I always get "Invalid Memory Access".
You used logical Or instead of bitwise | BINGO :lol:
As #FILE_SHARE_READ=1 and #FILE_SHARE_WRITE=2 the conjunction #FILE_SHARE_READ Or #FILE_SHARE_WRITE = 1 Or 2 = 1 but #FILE_SHARE_READ | #FILE_SHARE_WRITE = 1 | 2 = 3. So it could not work as the Writer ...
The manual says that a mutex only works within one programm (but several threads). The code above was just an example, actually I am having 3 seperate applications (1 writer, 2 readers).
You are closing the filehandle before releasing the mutex, that would be ...
I need to read a logfile in two different applications at the same time. As PB internal functions do not allow to set the Share-Mode I am using direct API-Calls. There I am using #FILE_SHARE_READ, but the second call always fails with error-code 32: ERROR_SHARING_VIOLATION: - The process ...
does anyone know if it is possible to convert a Windows-filehandle to a Purebasic-filehandle? I don't think this is possible. You can convert from a PureBasic-filehandle to an OS-filehandle but not the other way around. CreateFile_() only assigns a filehandle and won't use a specified filehandle ...
does anyone know if it is possible to convert a Windows-filehandle to a Purebasic-filehandle? I want to read a logfile, but as ReadFile can not read shared-read I want to use CreateFile_.
I found a structure which seems to be a PureBasic-filehandle (http://www.purebasic.fr/german ...
Got it now with help of the NSIS-forum: NSIS-DLL's must use the cdecl calling convention (Windows-default is stdcall) whereas the calling function cleans the stack (at stdcall the callee cleans the stack).
So ProcedureCDLL must be used instead of ProcedureDLL, that's it :D
I'm wondering if anyone has tried to create a NSIS-DLL with Purebasic and can share it here? I was able to call the function in the DLL, but I am not able to pass a parameter.
Thanks, Sepp
Example C-Plugin: http://nsis.sourceforge.net/Examples/Plugin/