Here is a small snippet from the sample code I've been in C++ API
Code:
#include "stdafx.h"
#include "ResultAPI.h"
#include "TerrainResultAPI.h"
int _tmain(int argc, _TCHAR* argv[])
{
std::wstring sProject = L"..\\data\\kursv2\\kursv2-1";
CResultAPI aResultAPI;
int iStat = aResultAPI.Open(sProject);
if (iStat < 0)
{
// error opening project
aResultAPI.Close();
return -1;
}
aRoadResultAPI.SetSectionselection(iAPI_SECTION_ALL);
etc
etc
How can aResultAPI be used without instantiated. That's what I do not quite understand. And how will it work if I write a wrapper as you mentioned. The above example violates everything I've learned about both the C++ and C#. This does not look like any object-oriented in all. Only a declaration that will be used? Although I do not have any knowledge of the header files but can it be that example. inclusion of ResultAPI.h makes the class for this header file (do not know the contents of the implementation file) will be instantiated when I include the header file? In such a case. How to know which header file to load the dll? DLL is located in the program area in general. Scanner only all classes and find one that implements the above header? What if there are several classes that implement the contents of the header?
Bookmarks