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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. I want a file DLL write by VC++ used in VisualBasic ?

I want a file DLL write by VC++ used in VisualBasic ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
2 Posts 2 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.
  • T Offline
    T Offline
    Thangnc
    wrote on last edited by
    #1

    I created a file DLL by VC++. After that to insert in VisualBasic I do following: From Menu choose Project->Reference...-> Browse to file *.DLL (Adsoft.DLL) Choose in ComboList (Prọect/Library)->Adsoft But any class and function in there don't to appear. If possible. Can you give me an example ? I write this class following: //VC++ // Adsoft.H #ifdef ADSOFT_IMPL #define CLASS_DECL_ADSOFT _declspec(dllexport) #else #define CLASS_DECL_ADSOFT _declspec(dllimport) #endif #undef AFX_DATA #define AFX_DATA CLASS_DECL_ADSOFT class AdsoftDLL : public CSocket { public: BOOL CGetCheckErro(int nErroCode); }; #undef AFX_DATA #define AFX_DATA // Adsoft.cpp #include "afxdllx.h" #include "Adsoft.h" BOOL CGetCheckErro(int nErroCode) { if (nErroCode==0) return FALSE; return TRUE; } But to happen phenomenon don't to want Thanks!

    T 1 Reply Last reply
    0
    • T Thangnc

      I created a file DLL by VC++. After that to insert in VisualBasic I do following: From Menu choose Project->Reference...-> Browse to file *.DLL (Adsoft.DLL) Choose in ComboList (Prọect/Library)->Adsoft But any class and function in there don't to appear. If possible. Can you give me an example ? I write this class following: //VC++ // Adsoft.H #ifdef ADSOFT_IMPL #define CLASS_DECL_ADSOFT _declspec(dllexport) #else #define CLASS_DECL_ADSOFT _declspec(dllimport) #endif #undef AFX_DATA #define AFX_DATA CLASS_DECL_ADSOFT class AdsoftDLL : public CSocket { public: BOOL CGetCheckErro(int nErroCode); }; #undef AFX_DATA #define AFX_DATA // Adsoft.cpp #include "afxdllx.h" #include "Adsoft.h" BOOL CGetCheckErro(int nErroCode) { if (nErroCode==0) return FALSE; return TRUE; } But to happen phenomenon don't to want Thanks!

      T Offline
      T Offline
      Trucker
      wrote on last edited by
      #2

      U will need to include/import that reference in your VB file. I believe for VB it will look something like this: Imports Adsoft TraileR ParK LifE 4Ever >:{

      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