PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: jermy on November 11, 2019, 02:40:02 PM

Title: error 42: Variable not declared
Post by: jermy on November 11, 2019, 02:40:02 PM
Why i cant use QueryFullProcessImageName?

Main.bas

#Include Once "windows.bi"   
#Include Once "win/winbase.bi"
#Include Once "win/wincrypt.bi"
#Include Once "Form1.inc"
''
''  Remove the following Application.Run code if it used elsewhere in your application.
Application.Run(Form1)


Form1.inc

''
''
Function Form1_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT

Dim Ret as WINBOOL
    Ret = FindClose(0)                                                   'winbase.bi
    Ret = IsDebuggerPresent                                          'winbase.bi 

   Ret = QueryFullProcessImageName(0, 0, 0, 0)            'winbase.bi

   print AfxGetWinErrMsg(GetLastError)

   Function = 0
End Function


The compiler says 'error 42: Variable not declared , QueryFullProcessImageName ...
I forgot to add something?.
Title: Re: error 42: Variable not declared
Post by: José Roca on November 11, 2019, 03:24:52 PM
> I forgot to add something?.

Yes. Put

#define _WIN32_WINNT &h0602

before the includes.
Title: Re: error 42: Variable not declared
Post by: jermy on November 11, 2019, 03:32:38 PM
that works, why didn't I think about that myself?

Tnx José