cpp code convert to visual basic 6
-
I have a cpp code, I had difficulty in doing the conversion to visual basic 6, is there anything that can help me. The following sample cpp program is: // Defined to disable deprecated functions warning in Visual C++ 2005 #define _CRT_SECURE_NO_DEPRECATE 1 #include #include #pragma pack(1) // set byte packing typedef struct { unsigned __int32 bLength; char szSerNum[9]; char szProdName[9]; unsigned __int64 MinFreq; unsigned __int64 MaxFreq; struct { unsigned __int32 ExtRef:1; unsigned __int32 FMWEnabled:1; unsigned __int32 Reserved:30; } Features; } RADIO_INFO2; #pragma pack() // set back the default packing // G305 API function type declarations typedef int (__stdcall *FNCOpenRadioDevice)(int iDeviceNum); typedef BOOL (__stdcall *FNCCloseRadioDevice)(int hRadio); typedef BOOL (__stdcall *FNCGetInfo)(int hRadio,RADIO_INFO2 *info); typedef BOOL (__stdcall *FNCSetAtten)(int hRadio, BOOL fAtten); typedef BOOL (__stdcall *FNCSetPower)(int hRadio, BOOL fPower); typedef BOOL (__stdcall *FNCSetAGC)(int hRadio, int iAGC); typedef BOOL (__stdcall *FNCBlockScan)(int hRadio,DWORD *Freqs,size_t Count,int StopSquelchRaw,DWORD FeedbackTime,HWND WinHandle,DWORD Msg); typedef BOOL (__stdcall *FNCStopBlockScan)(int hRadio); typedef BOOL (__stdcall *FNCCodecStart)(int hRadio,void (__stdcall *CallbackFunc)(void *),void *CallbackTarget); typedef BOOL (__stdcall *FNCCodecStop)(int hRadio); int main(int argc, char* argv[]) { // load the G3 API library HMODULE dll=LoadLibrary("wrg305api.dll"); if (!dll) { puts("WRG305API.DLL not found !"); return 0; } // link G3 API functions FNCOpenRadioDevice OpenRadioDevice=(FNCOpenRadioDevice)GetProcAddress(dll,"OpenRadioDevice"); FNCCloseRadioDevice CloseRadioDevice=(FNCCloseRadioDevice)GetProcAddress(dll,"CloseRadioDevice"); FNCGetInfo GetInfo=(FNCGetInfo)GetProcAddress(dll,"GetInfo"); FNCSetAtten SetAtten=(FNCSetAtten)GetProcAddress(dll,"SetAtten"); FNCSetPower SetPower=(FNCSetPower)GetProcAddress(dll,"SetPower"); FNCSetAGC SetAGC=(FNCSetAGC)GetProcAddress(dll,"SetAGC"); FNCBlockScan BlockScan=(FNCBlockScan)GetProcAddress(dll,"BlockScan"); FNCStopBlockScan StopBlockScan=(FNCStopBlockScan)GetProcAddress(dll,"StopBlockScan"); FNCCodecStart CodecStart=(FNCCodecStart)GetProcAddress(dll,"CodecStart"); FNCCodecStop CodecStop=(FNCCodecStop)GetProcAddress(dll,"CodecStop"); if (!GetInfo || !BlockScan || !StopBlockScan) { puts("Not all needed API function not found. Please updat
-
I have a cpp code, I had difficulty in doing the conversion to visual basic 6, is there anything that can help me. The following sample cpp program is: // Defined to disable deprecated functions warning in Visual C++ 2005 #define _CRT_SECURE_NO_DEPRECATE 1 #include #include #pragma pack(1) // set byte packing typedef struct { unsigned __int32 bLength; char szSerNum[9]; char szProdName[9]; unsigned __int64 MinFreq; unsigned __int64 MaxFreq; struct { unsigned __int32 ExtRef:1; unsigned __int32 FMWEnabled:1; unsigned __int32 Reserved:30; } Features; } RADIO_INFO2; #pragma pack() // set back the default packing // G305 API function type declarations typedef int (__stdcall *FNCOpenRadioDevice)(int iDeviceNum); typedef BOOL (__stdcall *FNCCloseRadioDevice)(int hRadio); typedef BOOL (__stdcall *FNCGetInfo)(int hRadio,RADIO_INFO2 *info); typedef BOOL (__stdcall *FNCSetAtten)(int hRadio, BOOL fAtten); typedef BOOL (__stdcall *FNCSetPower)(int hRadio, BOOL fPower); typedef BOOL (__stdcall *FNCSetAGC)(int hRadio, int iAGC); typedef BOOL (__stdcall *FNCBlockScan)(int hRadio,DWORD *Freqs,size_t Count,int StopSquelchRaw,DWORD FeedbackTime,HWND WinHandle,DWORD Msg); typedef BOOL (__stdcall *FNCStopBlockScan)(int hRadio); typedef BOOL (__stdcall *FNCCodecStart)(int hRadio,void (__stdcall *CallbackFunc)(void *),void *CallbackTarget); typedef BOOL (__stdcall *FNCCodecStop)(int hRadio); int main(int argc, char* argv[]) { // load the G3 API library HMODULE dll=LoadLibrary("wrg305api.dll"); if (!dll) { puts("WRG305API.DLL not found !"); return 0; } // link G3 API functions FNCOpenRadioDevice OpenRadioDevice=(FNCOpenRadioDevice)GetProcAddress(dll,"OpenRadioDevice"); FNCCloseRadioDevice CloseRadioDevice=(FNCCloseRadioDevice)GetProcAddress(dll,"CloseRadioDevice"); FNCGetInfo GetInfo=(FNCGetInfo)GetProcAddress(dll,"GetInfo"); FNCSetAtten SetAtten=(FNCSetAtten)GetProcAddress(dll,"SetAtten"); FNCSetPower SetPower=(FNCSetPower)GetProcAddress(dll,"SetPower"); FNCSetAGC SetAGC=(FNCSetAGC)GetProcAddress(dll,"SetAGC"); FNCBlockScan BlockScan=(FNCBlockScan)GetProcAddress(dll,"BlockScan"); FNCStopBlockScan StopBlockScan=(FNCStopBlockScan)GetProcAddress(dll,"StopBlockScan"); FNCCodecStart CodecStart=(FNCCodecStart)GetProcAddress(dll,"CodecStart"); FNCCodecStop CodecStop=(FNCCodecStop)GetProcAddress(dll,"CodecStop"); if (!GetInfo || !BlockScan || !StopBlockScan) { puts("Not all needed API function not found. Please updat
i didn't see any question, you are asking us to convert for you? :confused:
-
I have a cpp code, I had difficulty in doing the conversion to visual basic 6, is there anything that can help me. The following sample cpp program is: // Defined to disable deprecated functions warning in Visual C++ 2005 #define _CRT_SECURE_NO_DEPRECATE 1 #include #include #pragma pack(1) // set byte packing typedef struct { unsigned __int32 bLength; char szSerNum[9]; char szProdName[9]; unsigned __int64 MinFreq; unsigned __int64 MaxFreq; struct { unsigned __int32 ExtRef:1; unsigned __int32 FMWEnabled:1; unsigned __int32 Reserved:30; } Features; } RADIO_INFO2; #pragma pack() // set back the default packing // G305 API function type declarations typedef int (__stdcall *FNCOpenRadioDevice)(int iDeviceNum); typedef BOOL (__stdcall *FNCCloseRadioDevice)(int hRadio); typedef BOOL (__stdcall *FNCGetInfo)(int hRadio,RADIO_INFO2 *info); typedef BOOL (__stdcall *FNCSetAtten)(int hRadio, BOOL fAtten); typedef BOOL (__stdcall *FNCSetPower)(int hRadio, BOOL fPower); typedef BOOL (__stdcall *FNCSetAGC)(int hRadio, int iAGC); typedef BOOL (__stdcall *FNCBlockScan)(int hRadio,DWORD *Freqs,size_t Count,int StopSquelchRaw,DWORD FeedbackTime,HWND WinHandle,DWORD Msg); typedef BOOL (__stdcall *FNCStopBlockScan)(int hRadio); typedef BOOL (__stdcall *FNCCodecStart)(int hRadio,void (__stdcall *CallbackFunc)(void *),void *CallbackTarget); typedef BOOL (__stdcall *FNCCodecStop)(int hRadio); int main(int argc, char* argv[]) { // load the G3 API library HMODULE dll=LoadLibrary("wrg305api.dll"); if (!dll) { puts("WRG305API.DLL not found !"); return 0; } // link G3 API functions FNCOpenRadioDevice OpenRadioDevice=(FNCOpenRadioDevice)GetProcAddress(dll,"OpenRadioDevice"); FNCCloseRadioDevice CloseRadioDevice=(FNCCloseRadioDevice)GetProcAddress(dll,"CloseRadioDevice"); FNCGetInfo GetInfo=(FNCGetInfo)GetProcAddress(dll,"GetInfo"); FNCSetAtten SetAtten=(FNCSetAtten)GetProcAddress(dll,"SetAtten"); FNCSetPower SetPower=(FNCSetPower)GetProcAddress(dll,"SetPower"); FNCSetAGC SetAGC=(FNCSetAGC)GetProcAddress(dll,"SetAGC"); FNCBlockScan BlockScan=(FNCBlockScan)GetProcAddress(dll,"BlockScan"); FNCStopBlockScan StopBlockScan=(FNCStopBlockScan)GetProcAddress(dll,"StopBlockScan"); FNCCodecStart CodecStart=(FNCCodecStart)GetProcAddress(dll,"CodecStart"); FNCCodecStop CodecStop=(FNCCodecStop)GetProcAddress(dll,"CodecStop"); if (!GetInfo || !BlockScan || !StopBlockScan) { puts("Not all needed API function not found. Please updat
densti wrote:
I have a cpp code, I had difficulty in doing the conversion to visual basic 6, is there anything that can help me.
C++ to VB6? VB6 has been deprecated, meaning that there's only minimal support available. Next to that, VB6 does not facilitate all that's possible in C++. Compile your code using watcom or whatever and link to it - and stay away from VB6. There's no new technology created using that technology, since there's no place left to buy a new compiler. It "might" run on Win8 with some tweaks, but there's a good chance that the support will be cut in anything beyond Win8.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
I have a cpp code, I had difficulty in doing the conversion to visual basic 6, is there anything that can help me. The following sample cpp program is: // Defined to disable deprecated functions warning in Visual C++ 2005 #define _CRT_SECURE_NO_DEPRECATE 1 #include #include #pragma pack(1) // set byte packing typedef struct { unsigned __int32 bLength; char szSerNum[9]; char szProdName[9]; unsigned __int64 MinFreq; unsigned __int64 MaxFreq; struct { unsigned __int32 ExtRef:1; unsigned __int32 FMWEnabled:1; unsigned __int32 Reserved:30; } Features; } RADIO_INFO2; #pragma pack() // set back the default packing // G305 API function type declarations typedef int (__stdcall *FNCOpenRadioDevice)(int iDeviceNum); typedef BOOL (__stdcall *FNCCloseRadioDevice)(int hRadio); typedef BOOL (__stdcall *FNCGetInfo)(int hRadio,RADIO_INFO2 *info); typedef BOOL (__stdcall *FNCSetAtten)(int hRadio, BOOL fAtten); typedef BOOL (__stdcall *FNCSetPower)(int hRadio, BOOL fPower); typedef BOOL (__stdcall *FNCSetAGC)(int hRadio, int iAGC); typedef BOOL (__stdcall *FNCBlockScan)(int hRadio,DWORD *Freqs,size_t Count,int StopSquelchRaw,DWORD FeedbackTime,HWND WinHandle,DWORD Msg); typedef BOOL (__stdcall *FNCStopBlockScan)(int hRadio); typedef BOOL (__stdcall *FNCCodecStart)(int hRadio,void (__stdcall *CallbackFunc)(void *),void *CallbackTarget); typedef BOOL (__stdcall *FNCCodecStop)(int hRadio); int main(int argc, char* argv[]) { // load the G3 API library HMODULE dll=LoadLibrary("wrg305api.dll"); if (!dll) { puts("WRG305API.DLL not found !"); return 0; } // link G3 API functions FNCOpenRadioDevice OpenRadioDevice=(FNCOpenRadioDevice)GetProcAddress(dll,"OpenRadioDevice"); FNCCloseRadioDevice CloseRadioDevice=(FNCCloseRadioDevice)GetProcAddress(dll,"CloseRadioDevice"); FNCGetInfo GetInfo=(FNCGetInfo)GetProcAddress(dll,"GetInfo"); FNCSetAtten SetAtten=(FNCSetAtten)GetProcAddress(dll,"SetAtten"); FNCSetPower SetPower=(FNCSetPower)GetProcAddress(dll,"SetPower"); FNCSetAGC SetAGC=(FNCSetAGC)GetProcAddress(dll,"SetAGC"); FNCBlockScan BlockScan=(FNCBlockScan)GetProcAddress(dll,"BlockScan"); FNCStopBlockScan StopBlockScan=(FNCStopBlockScan)GetProcAddress(dll,"StopBlockScan"); FNCCodecStart CodecStart=(FNCCodecStart)GetProcAddress(dll,"CodecStart"); FNCCodecStop CodecStop=(FNCCodecStop)GetProcAddress(dll,"CodecStop"); if (!GetInfo || !BlockScan || !StopBlockScan) { puts("Not all needed API function not found. Please updat