Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

QueryServiceConfig

17 views
Skip to first unread message

jShAdEz

unread,
Jul 25, 2001, 10:59:53 PM7/25/01
to
Hi,
I've been using the WIN32API for a while, and still trying to get the
hang of using them in InstallShield. Now I'm trying to use
QueryServiceConfig, which in effect, must take a slump of memory and writes
to it (second argument)

BOOL QueryServiceConfig(
SC_HANDLE hService, // handle to service
LPQUERY_SERVICE_CONFIG lpServiceConfig, // buffer
DWORD cbBufSize, // size of buffer
LPDWORD pcbBytesNeeded // bytes needed
);


I've defined it as follows:

prototype BOOL Advapi32.QueryServiceConfig( NUMBER, POINTER, NUMBER, BYREF
NUMBER );

and used it as follows
typedef QUERY_SERVICE_CONFIG
begin
NUMBER dwServiceType;
NUMBER dwStartType;
NUMBER dwErrorControl;
STRING lpBinaryPathName[1024];
STRING lpLoadOrderGroup[1024];
NUMBER dwTagId;
STRING lpDependencies[1024];
STRING lpServiceStartName[1024];
STRING lpDisplayName[256];
end;
#define nzQUERY_SERVICE_CONFIG 4368

then I pass a pointer to the second argument to this structure, but my
install script keeps crashing ??

Can anyone please help me ? Thanks in advance,
Eric


0 new messages