Archive: make a custom plugin ?


make a custom plugin ?
i need to use some plugin in my program
Exactly is the FindProc. But this one is copyrighted and bytheway i got the decission to make my own plugin to find the process.

The nsis plugins are simple dlls ? or i must know something more to make them ?

example: This dll i told is usage like this:

FindProcDLL::FindProc "process_name.exe"

and the result come in the $R0 variable.
What i must do in my dll to return th result on this variable ?


setuservariable function will return stuff on nsis stack. I assuming that you already familiar with some c or c++ background and you have read exdll @ nsis source code.


well
i can make normal dlls using also vb6.
But i dont know if the structure of the nsis dll plugins must have some special.


You can't write plug-ins in VB. You'll need to learn a bit of C/C++ or Delphi. Other option is to write a VB6 executable but you'd have to install the VB6 run times first.

Stu


sorry afrow UK, but VB6 is able to produce normal dlls as C/C++ do. The limitation to produce activex dlls was for the past.

i only need some documentation to know the special things on the dll to give the result of the built in dll function to the variable R0 as do this other plugin i related.


Yes you can create dll's in VB6 but whether you can call them using the calling convention and whether you can access the information that is passed to the dll is another matter.

If you are able to, it will be helpful to others.

Stu


Originally posted by arfgh
sorry afrow UK, but VB6 is able to produce normal dlls as C/C++ do. The limitation to produce activex dlls was for the past.

i only need some documentation to know the special things on the dll to give the result of the built in dll function to the variable R0 as do this other plugin i related.
Now, that's very wrong, VB doesn't create "normall" dlls, because the dllmain entry points directly to visual basic 6 runtime, meaning only vb 6 apps can use them. But I think that there are some wrappers that can call you vb6 activex from C.
As I told you setuservariable, from exdll.h, has the "C" function to return values to the stack, like $R0.
I repeat, you can't use vb's dll directly with nsis as pointed by stu.

ok, i go to repeat.

VB6 by default only is able to create activex DLLs.
But doing a simple modification to the linker, is able to produce normal dlls as in C !

for that reason must be possible to create plugin for nsis using vb6.

I just need only the info or documentation to know how to give the result of the function on the r0 variable as do for example the plugin called FindProcDll.

can someon help ?


at finaly nobody can tell me why i cant do that ?

i am able to load my dll from the c++ with

hDLL = LoadLibrary("test.dll");


Then why i cant use it with nsis ?


use http://www.dependencywalker.com/ to make sure the exported function's name is correnct (no name mangling)

also, exports must use the _cdecl calling convention