Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMorphing source code Pin
fpehpeh25-Oct-09 23:20
fpehpeh25-Oct-09 23:20 
QuestionRe: Morphing source code Pin
Adam Roderick J25-Oct-09 23:43
Adam Roderick J25-Oct-09 23:43 
AnswerRe: Morphing source code Pin
fpehpeh25-Oct-09 23:53
fpehpeh25-Oct-09 23:53 
GeneralRe: Morphing source code Pin
Adam Roderick J26-Oct-09 0:40
Adam Roderick J26-Oct-09 0:40 
Question_Connection as parameter in IDL file Pin
MrKBA25-Oct-09 22:38
MrKBA25-Oct-09 22:38 
AnswerRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 1:04
professionalStuart Dootson26-Oct-09 1:04 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 1:23
MrKBA26-Oct-09 1:23 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 1:36
professionalStuart Dootson26-Oct-09 1:36 
This works for me:

import "oaidl.idl";
import "ocidl.idl";

[
	uuid(D39DD965-FC96-4C0A-AA62-CA3F5F117685),
	version(1.0),
	helpstring("cccc 1.0 Type Library")
]
library ccccLib
{
importlib("c:\Program Files\Common Files\System\ado\msado15.dll");
   [
	   object,
	   uuid(7CD26371-4A6B-4234-A024-6690A53CA450),
	   nonextensible,
	   helpstring("Itest Interface"),
	   pointer_default(unique)
   ]
   interface Itest : IUnknown
   {
      HRESULT DoSomething([in]_Connection* c);
      HRESULT GetCount([in]_Recordset* rs, [out]int* num);
   };
	importlib("stdole2.tlb");
	[
		uuid(F8AAE058-76E9-4F2C-995A-FB5B6565CED6),
		helpstring("test Class")
	]
	coclass test
	{
		[default] interface Itest;
	};
};


Alternatively, remove the importlib statement and add

import "MSADO15.idl";


either in or out of the library's scope. Both of these have worked for me

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 2:21
MrKBA26-Oct-09 2:21 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 2:51
professionalStuart Dootson26-Oct-09 2:51 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 3:01
MrKBA26-Oct-09 3:01 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 5:14
professionalStuart Dootson26-Oct-09 5:14 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 7:37
MrKBA26-Oct-09 7:37 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 7:56
professionalStuart Dootson26-Oct-09 7:56 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 9:03
MrKBA26-Oct-09 9:03 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 9:11
professionalStuart Dootson26-Oct-09 9:11 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 8:06
MrKBA27-Oct-09 8:06 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 9:02
professionalStuart Dootson27-Oct-09 9:02 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 9:15
MrKBA27-Oct-09 9:15 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 9:20
professionalStuart Dootson27-Oct-09 9:20 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 9:31
MrKBA27-Oct-09 9:31 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 9:37
professionalStuart Dootson27-Oct-09 9:37 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 9:44
MrKBA27-Oct-09 9:44 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 10:45
MrKBA27-Oct-09 10:45 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 13:06
professionalStuart Dootson27-Oct-09 13:06 

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.