: char file[255]; : GetWindowModuleFileName(hwnd,file,255); : : : 'GetWindowModuleFileName' : undeclared identifier : : : : so does anyone know why i cant get this to work? : : Compiler: MSVC++6 : Platform: MS-DOS : OS: Win ME : : and yes i included windows.h : I think you need to include winuser.h as well.
[b][red]This message was edited by Archer282 at 2004-1-21 18:8:5[/red][/b][hr] : : char file[255]; : : GetWindowModuleFileName(hwnd,file,255); : : : : : : 'GetWindowModuleFileName' : undeclared identifier : : : : : : : : so does anyone know why i cant get this to work? : : : : Compiler: MSVC++6 : : Platform: MS-DOS : : OS: Win ME : : : : and yes i included windows.h : : : I think you need to include winuser.h as well. : : Jonathan : : ### : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&& : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X; : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1."); : : but isnt winuser.h included with windows.h? Edit: i just tried including winuser.h too and it still returned the same error.
Comments
: GetWindowModuleFileName(hwnd,file,255);
:
:
: 'GetWindowModuleFileName' : undeclared identifier
:
:
:
: so does anyone know why i cant get this to work?
:
: Compiler: MSVC++6
: Platform: MS-DOS
: OS: Win ME
:
: and yes i included windows.h
:
I think you need to include winuser.h as well.
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
: : char file[255];
: : GetWindowModuleFileName(hwnd,file,255);
: :
: :
: : 'GetWindowModuleFileName' : undeclared identifier
: :
: :
: :
: : so does anyone know why i cant get this to work?
: :
: : Compiler: MSVC++6
: : Platform: MS-DOS
: : OS: Win ME
: :
: : and yes i included windows.h
: :
: I think you need to include winuser.h as well.
:
: Jonathan
:
: ###
: for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
:
:
but isnt winuser.h included with windows.h?
Edit: i just tried including winuser.h too and it still returned the same error.
[code]
#include "stdafx.h"
#include
#include
using namespace std;
int main()
{
char buf[255];
memset(buf,0,sizeof(buf));
GetModuleFileName(0,buf,sizeof(buf));
cout << buf << endl;
cin.ignore();
return 0;
}
[/code]
: works for me
: [code]
: #include "stdafx.h"
:
: #include
: #include
: using namespace std;
:
: int main()
: {
: char buf[255];
: memset(buf,0,sizeof(buf));
: GetModuleFileName(0,buf,sizeof(buf));
: cout << buf << endl;
: cin.ignore();
: return 0;
: }
: [/code]
:
:
notice: the function im trying to use is GetWindowModuleFileName()
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getwindowmodulefilename.asp?frame=true
you used GetModuleFileName
: http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getwindowmodulefilename.asp?frame=true
:
: you used GetModuleFileName
:
It's defined in WinUser.h, available only in the Platform SDK which is free from MSDN -- but I don't know it is still available for VC++ 6.0.