Click here to Skip to main content
15,916,601 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Using command line parameters with ShellExecute() ? Pin
toxcct21-Apr-07 10:22
toxcct21-Apr-07 10:22 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
Atom21-Apr-07 15:32
Atom21-Apr-07 15:32 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
Michael Dunn21-Apr-07 17:49
sitebuilderMichael Dunn21-Apr-07 17:49 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
Atom22-Apr-07 3:28
Atom22-Apr-07 3:28 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
toxcct22-Apr-07 4:33
toxcct22-Apr-07 4:33 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
Atom22-Apr-07 7:19
Atom22-Apr-07 7:19 
GeneralRe: Using command line parameters with ShellExecute() ? Pin
toxcct22-Apr-07 7:41
toxcct22-Apr-07 7:41 
QuestionHow to work with manage code in the dll Pin
Romiks21-Apr-07 8:43
Romiks21-Apr-07 8:43 
Hi All,
I have another problem with calling manage code from dll.
I do the following:
1. Create dll project in the VS2005, add /clr option under project property->C++->general
2. Add header file to the project with interface:

<br />
   #define Base_API __declspec(dllexport)<br />
<br />
   class BaseI_SqlDbConnection;<br />
   class Base_API Base_SqlDbConnection<br />
   {<br />
    public:<br />
	Base_SqlDbConnection();	<br />
	BaseI_SqlDbConnection *m_pi;<br />
    };<br />

3. Add define of class to the .cpp file. It is the simple wrapper on the SqlClient.
<br />
   using namespace System;<br />
   using namespace Data;<br />
   using namespace SqlClient;<br />
<br />
   #ifdef _MANAGED<br />
   #pragma managed(push, off)<br />
   #endif<br />
   BOOL APIENTRY DllMain( HMODULE hModule,<br />
                          DWORD  ul_reason_for_call,<br />
                          LPVOID lpReserved<br />
					 )<br />
   {<br />
    return TRUE;<br />
   }<br />
   #ifdef _MANAGED<br />
   #pragma managed(pop)<br />
   #endif<br />
   class BaseI_SqlDbConnection<br />
   {<br />
    public:<br />
	BaseI_SqlDbConnection()<br />
		: m_SqlDbConnection(gcnew SqlConnection){}<br />
<br />
	gcroot<SqlConnection ^> m_SqlDbConnection;<br />
   };<br />
   Base_SqlDbConnection::Base_SqlDbConnection() : m_pi(new BaseI_SqlDbConnection)<br />
   {<br />
   }<br />

4. Call the class from MFC application looking like this:
Base_SqlDbConnection test;

With help of debugger, I found that the BaseI_SqlDbConnection()
constructor doesn't want to call and object m_SqlDbConnection could not be created.

I guess that the problem is in the managed code, but I am newbie for this. Please help
me to resolve the problemFrown | :( or point me to the article about this.
QuestionServer application which will listen to a port. Pin
chandni_chandrakant_maheta21-Apr-07 4:23
chandni_chandrakant_maheta21-Apr-07 4:23 
AnswerRe: Server application which will listen to a port. Pin
Mark Salsbery21-Apr-07 7:40
Mark Salsbery21-Apr-07 7:40 
Questionautomation for excel Pin
prithaa21-Apr-07 3:38
prithaa21-Apr-07 3:38 
QuestionDraw selected image item Pin
TPN21-Apr-07 2:36
TPN21-Apr-07 2:36 
QuestionThreading Pin
neha.agarwal2721-Apr-07 2:08
neha.agarwal2721-Apr-07 2:08 
AnswerRe: Threading Pin
TPN21-Apr-07 2:42
TPN21-Apr-07 2:42 
QuestionHow to change font of Top Menu? Pin
Atul2321-Apr-07 0:09
Atul2321-Apr-07 0:09 
AnswerRe: How to change font of Top Menu? Pin
Rajesh R Subramanian21-Apr-07 3:14
professionalRajesh R Subramanian21-Apr-07 3:14 
GeneralRe: How to change font of Top Menu? Pin
Hamid_RT21-Apr-07 6:05
Hamid_RT21-Apr-07 6:05 
GeneralRe: How to change font of Top Menu? Pin
toxcct21-Apr-07 10:29
toxcct21-Apr-07 10:29 
QuestionTooltip for button inside group box Pin
rp_suman20-Apr-07 23:59
rp_suman20-Apr-07 23:59 
AnswerRe: Tooltip for button inside group box Pin
PJ Arends21-Apr-07 15:06
professionalPJ Arends21-Apr-07 15:06 
QuestionRe: Tooltip for button inside group box Pin
Rajesh R Subramanian21-Apr-07 17:36
professionalRajesh R Subramanian21-Apr-07 17:36 
AnswerRe: Tooltip for button inside group box Pin
PJ Arends22-Apr-07 10:19
professionalPJ Arends22-Apr-07 10:19 
Questionvtable Pin
Kiran Pinjala20-Apr-07 23:20
Kiran Pinjala20-Apr-07 23:20 
AnswerRe: vtable Pin
CPallini21-Apr-07 11:42
mveCPallini21-Apr-07 11:42 
QuestionHow can i write/read CRecordset object into/from file? Pin
$uresh $hanmugam20-Apr-07 22:41
$uresh $hanmugam20-Apr-07 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.