Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. cpp code convert to visual basic 6

cpp code convert to visual basic 6

Scheduled Pinned Locked Moved Visual Basic
c++jsonhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    densti
    wrote on last edited by
    #1

    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

    M L S 3 Replies Last reply
    0
    • D densti

      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

      M Offline
      M Offline
      Midnight Ahri
      wrote on last edited by
      #2

      i didn't see any question, you are asking us to convert for you? :confused:

      1 Reply Last reply
      0
      • D densti

        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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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[^]

        1 Reply Last reply
        0
        • D densti

          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

          S Offline
          S Offline
          shubham salwan
          wrote on last edited by
          #4

          This may help you http://tangiblesoftwaresolutions.com/Product_Details/CPlusPlus_to_VB_Converter_Details.html[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups