V
Viktor
Hi everybody,
Perhaps this question is obvious, but I spent whole day trying to make
it work to no avail.
Here is the scenario:
I am using VC++ .Net, Forms. I created a simple Form project, dropped
couple of controls on the form. Now I am trying to call
GetProfileSection(...) to read values from .ini file. IDE seems to
know this function, since it shows parameter list as a tooltip as soon
as I type "GetProfileSection(".
But when I am trying to build it, I am getting "GetProfileSection:
identifier not found..." error. GetProfileSection is declared in
winbase.h, but if I try to add #include <winbase.h>, I am getting 78
errors in winbase.h, which cannot be true. Same happens with calls to
other functions, declared in other headers.
I was trying to find an explanation on a web but couldn't, although
there must be some simple explanation.
Any help would be greatly appreciated.
Viktor
Below is a top portion of my Form1.h, (the unit that contains buttons'
OnClick events etc, where I am trying to call GetProfileSection)
#pragma once
namespace Test1
{
#include<string.h>
#include <winbase.h> // Is this correct place to include .h?
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System:ata;
using namespace System:rawing;
using namespace System::Collections;
using namespace System::Runtime::InteropServices;
Perhaps this question is obvious, but I spent whole day trying to make
it work to no avail.
Here is the scenario:
I am using VC++ .Net, Forms. I created a simple Form project, dropped
couple of controls on the form. Now I am trying to call
GetProfileSection(...) to read values from .ini file. IDE seems to
know this function, since it shows parameter list as a tooltip as soon
as I type "GetProfileSection(".
But when I am trying to build it, I am getting "GetProfileSection:
identifier not found..." error. GetProfileSection is declared in
winbase.h, but if I try to add #include <winbase.h>, I am getting 78
errors in winbase.h, which cannot be true. Same happens with calls to
other functions, declared in other headers.
I was trying to find an explanation on a web but couldn't, although
there must be some simple explanation.
Any help would be greatly appreciated.
Viktor
Below is a top portion of my Form1.h, (the unit that contains buttons'
OnClick events etc, where I am trying to call GetProfileSection)
#pragma once
namespace Test1
{
#include<string.h>
#include <winbase.h> // Is this correct place to include .h?
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System:ata;
using namespace System:rawing;
using namespace System::Collections;
using namespace System::Runtime::InteropServices;