cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
usmanjamil
Pilgrim

Howto set SERVICE_IS_PARAMS.lpDependencies value

Hi

I am adding a windows service using ServiceAddService function. This function alone would not let me set the dependancy of the service. So I read in the documentation that I need to SERVICE_IS_PARAMS.lpDependencies to do so before calling ServiceAddService. I'm trying to assign it a value as

SERVICE_IS_PARAMS.lpDependencies = "myservice\0\0";

but its not working and giving me compile time error "Numeric value required". Can someone please help me with this.

Regards

Usman
Labels (1)
0 Kudos
1 Reply
RobertDickau
Pilgrim

Re: Howto set SERVICE_IS_PARAMS.lpDependencies value

I think that field wants a string pointer; perhaps trying defining a STRING variable (depsvcs, say) with the dependency or dependencies, and then setting:

SERVICE_IS_PARAMS.lpDependencies = &depsvcs;
0 Kudos