This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

using kill in cygwin1.dll


Hi,

I'll try to call the function kill from a Borland Application to kill a cygwin application.

typedef int __declspec(dllimport) _pascal PKill(int pid, int signal);
...
HMODULE mod = LoadLibrary("cygwin1.dll");
Kill = (PKill) GetProcAddress("kill");
...
int ret = Kill(pid,signal);
...

If I call the system like that I'll get a -1 as return -> Error.

So here are my questions :

1) Do I need to initialize something before calling kill?
2) is _pascal the correct calling style (or _stdcall, _cdecl)??
3) Are the types correct? (I would say so, but who knows for sure)

Thx
David Ecker

--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]