|
You cannot use the .NET framework from a native application (MFC, C, C++, whatever).
If you want to use applications that exploit the features of .NET framework, then you will need to write code in one of those managed languages (C#, VB.NET, CLI/C++)
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
You can make a dll and use of it on the c++ or vice versa.
|
|
|
|
|
Hi!
I've to run an exe from another Project. This exe is in the same machine only. Shall I use Remote Procedure Call to achieve this? How to do Remote Procedure Call in C++?
|
|
|
|
|
|
I don't know the which values should I pass to the parameters. Can u please expalin?
|
|
|
|
|
|
T.RATHA KRISHNAN wrote: I don't know the which values should I pass to the parameters
what do you think the docs[^] are for ???
|
|
|
|
|
Use CreateProcess if you want more control over process being spawned
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
T.RATHA KRISHNAN wrote: Shall I use Remote Procedure Call to achieve this?
What does RPC or MIDL has to do here? You want to learn RPC or just run an executable?
If you need to run an executable, you just need ShellExecute or CreateProcess as someone already said.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
T.RATHA KRISHNAN wrote: I've to run an exe from another Project.
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi
I am geting error like this..Plz help me to solve that..
[code]
error C2011: '_STORAGE_BUS_TYPE' : 'enum' type redefinition
[/code]
|
|
|
|
|
Reason is here[^]. Check whether you've defined your _STORAGE_BUS_TYPE more than once.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
thax's problem solve.Just i comment it..
But i have found some more error..
[code]
error C2061: syntax error : identifier 'PSTORAGE_DEVICE_DESCRIPTOR'
error C2511: 'bool CMy4Dlg::GetDisksProperty(HANDLE,PSTORAGE_DEVICE_DESCRIPTOR)' : overloaded member function not found in 'CMy4Dlg'
error C2061: syntax error : identifier 'PSTORAGE_DEVICE_DESCRIPTOR'
[/code]
so plz help me
|
|
|
|
|
From MSDN[^], i found STORAGE_DEVICE_DESCRIPTOR is declared in header file - Ntddstor.h . So check whether you've included it or not.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
yes i include Ntddstor.h..
|
|
|
|
|
vcprog wrote: error C2511: 'bool CMy4Dlg::GetDisksProperty(HANDLE,PSTORAGE_DEVICE_DESCRIPTOR)' : overloaded member function not found in 'CMy4Dlg'
Check whether the signature of CMy4Dlg::GetDisksProperty() is exactly same in header and in cpp file?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Tuesday, August 19, 2008 5:20 AM
|
|
|
|
|
Hello everyone,
I am inserting vb activex control in VC program.In VB ocx program i am passing variables of type recordset from database.when i am inserting this ocx into my VC program those recordset datatypes are converting as LPDISPATCH* type. and my variables of type CRecordset. it is giving error like this:
C:\Program Files\Microsoft Visual Studio\My Projects\RecordSetPgm\RecordSetPgmDlg.cpp(255) : error C2664: 'Processattendacne' : cannot convert parameter 1 from 'class CRecordset' to 'struct IDispatch ** '
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
VB ocx Code is like this:
void C_UserControl1::Processattendacne(LPDISPATCH* rs, LPDISPATCH* rs1, BOOL* blnprocess)
{
static BYTE parms[] =
VTS_PDISPATCH VTS_PDISPATCH VTS_PBOOL;
InvokeHelper(0x60030000, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
rs, rs1, blnprocess);
}
And VC++ Code is like this:
database.Open(NULL,false,false,sDsn); // Open Clients.MDB
CRecordset recset( &database );
SqlString="SELECT field1 FROM sample";
recset.Open(CRecordset::dynamic,SqlString,CRecordset::readOnly);
CRecordset recset1(&database);
Client= "SELECT field2 FROM sample";
recset1.Open(CRecordset::dynamic,Client,CRecordset::readOnly);
m_UserControl.Processattendacne(recset,recset1,bstr);
database.Close();
please tell me what type of parameters i have to take and how should i declare those please tell me...please Help me out..i am trying this but i am not getting...please give me some suggestions..
Thanks in Advance,
Savitri
|
|
|
|
|
|
hii
It is only with simple program but i am passing variable to activeX control to do the operations like adding ,deleting etc..It is not taking of type recodeset directly..so tell me what data type i have to use..
please see my code..I pasted my code in my first message please will u tell me how to do this ..
HELP ME OUT..
Thanks in advance,
savitri
|
|
|
|
|
CRecordset is an MFC class which is not IDispatch compatible. VB ActiveX method that you are using, requires an IDispatch interface as parameter. If you use ActiveX Data Object (ADO) instead of CRecordset class then you will be able to pass the object to your VB ActiveX methods. I have included the link to samples in my previous post. These will help you get started.
I hope this helps.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hii,
If so please tell me how to do the connections and which header files i have to include please..I dont have idea adout ADO..I am using access database.will you tell me about connection and all..i am doing that only ok..
Please help me out...
Thanks in advance,
Savitri
|
|
|
|
|
Please see the links from my previous post. Following might also help Using ADO from VC++[^]
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Are you allergic to following directions? He's provided you with what you require...twice.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
I want to develop a USB Small project which show all information about USB Device like USB Device name,drive name and file or folder name.Plz help me..
|
|
|
|
|