This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
using kill in cygwin1.dll
- From: David Ecker <david dot ecker at synaptron dot de>
- To: "cygwin" <cygwin at cygwin dot com>
- Date: Tue, 25 Jun 2002 14:43:56 +0200
- Subject: 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/