error compiling

twisted

Member
Licensed User
Longtime User
what does this error mean:

Error Message: error CS0176: static member
'dzHW.dzHW.GetpProcessHandle(string)'cannot be accessed with an instance reference; qualify it with a type name instead
line number: 12
line: process = procname.GetProcessHandle(ProcessName)

B4X:
'part of App_Start
Sub App_Start
   procname.New1
   ProcessName="device.exe"
   process = procname.GetProcessHandle(ProcessName)
   If process > 0 Then sysland_statechanged
   If process < 0 Then Msgbox("myapp is not running.","Error!!!",cMsgboxOK,cMsgboxNone)
   frmLandscape.Text=""
end sub

thanks very much.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Unfortunately dzt's library wasn't updated to support the optimized compiler.
This issue is caused due to a difference in the functions signature between the device library and the desktop library.
A simple workaround is to remove the reference of dzHWDesktop.dll and add dzHW.dll to the desktop and device.
You will not be able to run your program on the desktop but it should compile fine (after compiling you can return to the previous configuration).
 

twisted

Member
Licensed User
Longtime User
Unfortunately dzt's library wasn't updated to support the optimized compiler.
This issue is caused due to a difference in the functions signature between the device library and the desktop library.
A simple workaround is to remove the reference of dzHWDesktop.dll and add dzHW.dll to the desktop and device.
You will not be able to run your program on the desktop but it should compile fine (after compiling you can return to the previous configuration).

thanks very much.
 
Top