13.07.2015 Aufrufe

DG8SAQ VECTOR NETWORK ANALYZER VNWA HILFE - SDR-Kits

DG8SAQ VECTOR NETWORK ANALYZER VNWA HILFE - SDR-Kits

DG8SAQ VECTOR NETWORK ANALYZER VNWA HILFE - SDR-Kits

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

Borland C++ Builder UserDLL exampleBorland C ++ Beispiel des Baumeisters UserDLLDer folgende Borland C-Code definiert ein einfaches Beispiel dll mit dem Namen userdll.dll:// Example UserDLL for <strong>VNWA</strong> by <strong>DG8SAQ</strong> and M0PUB// Written with Borland C++ 6.0 Personal// March 8th, 2011#include #include HANDLE ho; //console handle// User Function 'Init'// will be called when UserDLL is being loadedextern "C" __declspec(dllexport)void Init (void){char *string = "UserDLL function Init called.";DWORD d;// release current console if anyFreeConsole();// create new consoleAllocConsole();// get console output handleho = GetStdHandle(STD_OUTPUT_HANDLE);// output stringWriteConsole(ho, string, lstrlen(string),&d, NULL);}// User Function 'Close'// will be called when UserDLL is being unloadedextern "C" __declspec(dllexport)void Close (void){// close console output handleCloseHandle(ho);// release consoleFreeConsole();}// User Function 'Process'// will be called after every complete sweep cycle, if postprocessing is activated//// Pascal declaration for comparison// procedure _Process(FData: TDoubleArray; SType: Integer; SData: TComplexArray;// Len: integer; Rec: integer; tm: TDateTime; temp: Double);// export; cdecl;// Note that the C-code doesn't require the underscore in front of the function nameextern "C" __declspec(dllexport)void Process (double *FData, int SType, double *SData, int Len,int what, double tm, double temp){char string[50];char sfloat[25];DWORD d;strcpy(string, "UserDLL function Process called.");WriteConsole(ho, string, lstrlen(string),&d, NULL);strcpy(string, " Start Frequency = ");sprintf (sfloat, "%.*f", 10, FData[0]);strcat(string, sfloat);strcat(string, "");WriteConsole(ho, string, lstrlen(string),&d, NULL);strcpy(string, " Stop Frequency = ");sprintf (sfloat, "%.*f", 10, FData[1]);strcat(string, sfloat);- 379 -

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!