error compiling

Discussion in 'Questions (Windows Mobile)' started by twisted, Jan 31, 2009.

  1. twisted

    twisted Member Licensed 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)

    Code:
    '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.
     
  2. Erel

    Erel Administrator Staff Member Licensed 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).
     
  3. twisted

    twisted Member Licensed User

    thanks very much.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice