NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
AlexBarry
Posts: 1
0 Kudos

Using NI controls in multiple DLLs (VC++)

I have a VC++ project consisting of several DLLs that I've been having trouble getting to run properly. The main EXE project has some dialogs that use CNiGraph controls and other similar graphing objects. I have tried to create a DLL project that also has dialogs that use CNiGraph's. However, when I call into the DLL from the EXE and try to instantiate the dialog with DoModal, it fails and returns -1. In the VC++ debug window I get a message (with the CNiGraph GUID) about the control not being registered. I have made all of the appropriate calls to AfxEnableControlContainer (in InitInstance) and AFX_MANAGE_STATE (in exported functions).

Can you have NI controls spread across modules like this?
Member
JoeTestEngineer
Posts: 99
0 Kudos

Re: Using NI controls in multiple DLLs (VC++)

CNiGraph derives from COject... You need to be developing an MFC Extention DLL....
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page