User forums > Using Code::Blocks
Need help: auto-complete can't find CreateFile
jsandraw:
when type createfile...., auto-complete just give 'CreateFileMoniker'
but CreateFile can compile and run in the .cpp
How can I set proper for auto-complete to show 'CreateFile'?
jsandraw:
Can't find CreateFile/CloseHandle, but auto-complete can find ReadFile/WriteFile, s.b. know why?
Loaden:
--- Quote from: jsandraw on January 15, 2010, 01:53:58 pm ---when type createfile...., auto-complete just give 'CreateFileMoniker'
but CreateFile can compile and run in the .cpp
How can I set proper for auto-complete to show 'CreateFile'?
--- End quote ---
I can confirm it. SVN6086
[attachment deleted by admin]
ollydbg:
OK, I can confirm this.
This code does not work.
--- Code: ---#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
CreateFil
return 0;
}
--- End code ---
If you open the CC Debug dialog
see http://wiki.codeblocks.org/index.php?title=Code_Completion_Design#Code-Completion_debug_tool_dialog
, you will notice that "winbase.h" is not in the CC's file list, so this is the reason.
But this code works
--- Code: ---#include <iostream>
#include <windows.h>
#include <winbase.h>
using namespace std;
int main()
{
CreateFi
return 0;
}
--- End code ---
MortenMacFly:
windows.h should usually be enough. However, you find this section in windows.h:
--- Code: ---#ifdef RC_INVOKED
/* winresrc.h includes the necessary headers */
#include <winresrc.h>
#else
#include <stdarg.h>
#include <windef.h>
#include <wincon.h>
#include <winbase.h>
(...)
--- End code ---
As CC does not fully support macro handling the first case (as if RC_INVOKED would be defined) is used. Thus the references are incomplete. However, I don't know "who" usually defines this macro. It looks like the resource compiler does so at runtime (compile time).
Navigation
[0] Message Index
[#] Next page
Go to full version