GiantMatrix
asked on
If statement question part 2
Hi All,
I have the following 2 problems in code, so can someone please tell me what exactly I am doing wrong in them:
A)
var
SCM, SCH: SC_HANDLE;
begin
SCM := OpenSCManager(Nil, Nil, SC_MANAGER_ALL_ACCESS);
if SCM <> Nil then
In the above block of code I always get an error:
[Error] Unit1.pas(175): Operator not applicable to this operand type
So can someone please tell me what exactly I am doing wrong here?
B)
if ChangeServiceConfig(SCH, SERVICE_NO_CHANGE, SERVICE_AUTO_START,SERVICE _NO_CHANGE ,Nil,Nil,N il,Nil,Nil ,Nil,PChar (ServiceNa me) ) <> 0 then
I always get Error: [Error] Unit1.pas(180): Incompatible types
So can someone please tell me what exactly I am doing wrong here?
I have the following 2 problems in code, so can someone please tell me what exactly I am doing wrong in them:
A)
var
SCM, SCH: SC_HANDLE;
begin
SCM := OpenSCManager(Nil, Nil, SC_MANAGER_ALL_ACCESS);
if SCM <> Nil then
In the above block of code I always get an error:
[Error] Unit1.pas(175): Operator not applicable to this operand type
So can someone please tell me what exactly I am doing wrong here?
B)
if ChangeServiceConfig(SCH, SERVICE_NO_CHANGE, SERVICE_AUTO_START,SERVICE
I always get Error: [Error] Unit1.pas(180): Incompatible types
So can someone please tell me what exactly I am doing wrong here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.