Click here to Skip to main content
15,847,263 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMorphing source code Pin
fpehpeh26-Oct-09 0:20
fpehpeh26-Oct-09 0:20 
QuestionRe: Morphing source code Pin
Adam Roderick J26-Oct-09 0:43
Adam Roderick J26-Oct-09 0:43 
AnswerRe: Morphing source code Pin
fpehpeh26-Oct-09 0:53
fpehpeh26-Oct-09 0:53 
GeneralRe: Morphing source code Pin
Adam Roderick J26-Oct-09 1:40
Adam Roderick J26-Oct-09 1:40 
Question_Connection as parameter in IDL file Pin
MrKBA25-Oct-09 23:38
MrKBA25-Oct-09 23:38 
AnswerRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 2:04
professionalStuart Dootson26-Oct-09 2:04 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 2:23
MrKBA26-Oct-09 2:23 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 2:36
professionalStuart Dootson26-Oct-09 2: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 3:21
MrKBA26-Oct-09 3:21 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 3:51
professionalStuart Dootson26-Oct-09 3:51 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 4:01
MrKBA26-Oct-09 4:01 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 6:14
professionalStuart Dootson26-Oct-09 6:14 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 8:37
MrKBA26-Oct-09 8:37 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 8:56
professionalStuart Dootson26-Oct-09 8:56 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA26-Oct-09 10:03
MrKBA26-Oct-09 10:03 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson26-Oct-09 10:11
professionalStuart Dootson26-Oct-09 10:11 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 9:06
MrKBA27-Oct-09 9:06 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 10:02
professionalStuart Dootson27-Oct-09 10:02 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 10:15
MrKBA27-Oct-09 10:15 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 10:20
professionalStuart Dootson27-Oct-09 10:20 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 10:31
MrKBA27-Oct-09 10:31 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 10:37
professionalStuart Dootson27-Oct-09 10:37 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 10:44
MrKBA27-Oct-09 10:44 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 11:45
MrKBA27-Oct-09 11:45 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 14:06
professionalStuart Dootson27-Oct-09 14: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.