Actually, what I need to do is a fair bit more complex than string marshalling. It feels like I'll need to pull together a number of different concepts so I may as well describe the problem directly.
The C function I want to call is StartServiceCtrlDispatcher:
BOOL StartServiceCtrlDispatcher(It takes an array of SERVICE_TABLE_ENTRY structures:
const LPSERVICE_TABLE_ENTRY lpServiceTable
);
typedef struct _SERVICE_TABLE_ENTRY {The typedef LPSERVICE_MAIN_FUNCTION is something like:
LPTSTR lpServiceName;
LPSERVICE_MAIN_FUNCTION lpServiceProc;
} SERVICE_TABLE_ENTRY,
*LPSERVICE_TABLE_ENTRY;
typedef (VOID WINAPI ServiceMain)(It seems to me that I'll need to learn how to do the following:
DWORD dwArgc,
LPTSTR* lpszArgv
);
On Tue, Feb 06, 2007 at 12:40:38PM +1100, John Ky wrote:
> Hi Stefan,
>
> In that case, how do I marshall [String] to Ptr (Ptr CChar)?
look at Foreign.C.String and Foreign.Ptr