Forum > Windows

Making a DLL for rundll32

(1/1)

PaulANormanNZ:
Hi,

Has any one had experience with making a dll with Lazarus for rundll32 to use please?

I've read through ...

http://support.microsoft.com/kb/164787
http://vlaurie.com/computers2/Articles/rundll32.htm

And came across this remark from Peter Below (TeamB) borland.public.delphi.objectpascal and borland.public.delphi.winapi Usenet newsgroups:
 " there is in fact a program available on Win32 that will do that:
RunDLL32. There is in fact a way to pass parameters to the function but i have yet to see documentation for it. "

 I've  tried a few experiments, but no success so far.

Would C++  LPSTR lpszCmdLine just be a WideString?

Any pointers appreciated please.

Paul

BlueIcaro:
Did you read this?
http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries

/BlueIcaro

Laksen:

--- Quote from: PaulANormanNZ on September 19, 2011, 01:20:51 pm ---Would C++  LPSTR lpszCmdLine just be a WideString?

--- End quote ---
No, it's a pointer to a null terminated string of ansi chars. LPWSTR is a pointer to a null terminated string of wide chars

PaulANormanNZ:
Thanks BlueIcaro, yes and I've had no problem so far actually making a dll that generally works, its getting things working with rundll32.

Thanks Laksen,  so LPSTR lpszCmdLine would cast to PChar?

The ansii table being basic ascii for its firts keyboard type members?

Paul

PaulANormanNZ:
I'll do some more checking first (that no one has done it  already), but I think I may end up writing my own executable(s) for running dll functions form the command line, then I can endeavour to make it cross platform as well, and make my dll's with companion .so's (codePilot cross compile?)

Very useful for calling from scripting engines that have a system call.

Paul

Navigation

[0] Message Index

Go to full version