Win32 and modules

P

pgodfrin

Greetings,

Is there anything out there to make using Win32 modules (Activestate)
not require dusting off my C skills? Case in point - Win32::Service:

GetStatus(hostName, serviceName, status)
The third argument must be a hash reference that will be populated
with entries corresponding to the SERVICE_STATUS structure of the
Win32 API.

Microsoft says:

C++

typedef struct _SERVICE_STATUS {
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DWORD dwServiceSpecificExitCode;
DWORD dwCheckPoint;
DWORD dwWaitHint;
}SERVICE_STATUS, *LPSERVICE_STATUS;

Do I have remember how to do all that "or-ing" and "and-ing" again?
pg
 
P

pgodfrin

Quoth pgodfrin <[email protected]>:









Yes. It's not difficult though: you don't need to know any C, just a
how & and | work.

Ben

Hi Ben,
(nice to hear from you - I've been away a while...)
Yeah - I just panicked. Seems the GetStatus function updates the
structure directly - and it looks like MS might not have combined
flags. So a Dumper that prints a decimal 16 is 0x00000020 and that's
that. I wonder if I will have to learn the & and | operators :)
pg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top