Click here to Skip to main content
15,914,452 members
Home / Discussions / C#
   

C#

 
GeneralRe: Setting a stylesheet in AxWebBrowser control Pin
Nick Parker3-Sep-04 7:07
protectorNick Parker3-Sep-04 7:07 
GeneralSmtpMail timeout Pin
hkulten3-Sep-04 3:25
hkulten3-Sep-04 3:25 
QuestionHow to create a dynamic component to include multiple text sections and buttons? Pin
Liquidian3-Sep-04 3:15
Liquidian3-Sep-04 3:15 
AnswerRe: How to create a dynamic component to include multiple text sections and buttons? Pin
Heath Stewart3-Sep-04 6:53
protectorHeath Stewart3-Sep-04 6:53 
GeneralSet method of Expandable property not getting called Pin
pradeep_pc3-Sep-04 2:26
pradeep_pc3-Sep-04 2:26 
GeneralRe: Set method of Expandable property not getting called Pin
Heath Stewart3-Sep-04 6:58
protectorHeath Stewart3-Sep-04 6:58 
GeneralRe: Set method of Expandable property not getting called Pin
Anonymous3-Sep-04 19:44
Anonymous3-Sep-04 19:44 
GeneralDataGrid Cell Color - C# Pin
Jo Develper3-Sep-04 2:15
Jo Develper3-Sep-04 2:15 
GeneralRe: DataGrid Cell Color - C# Pin
sreejith ss nair3-Sep-04 2:37
sreejith ss nair3-Sep-04 2:37 
GeneralRe: DataGrid Cell Color - C# Pin
Jo Develper3-Sep-04 5:17
Jo Develper3-Sep-04 5:17 
GeneralRe: DataGrid Cell Color - C# Pin
Not Active3-Sep-04 5:43
mentorNot Active3-Sep-04 5:43 
GeneralRe: DataGrid Cell Color - C# Pin
Jo Develper5-Sep-04 23:16
Jo Develper5-Sep-04 23:16 
Questioncan not return com from c# Pin
umedkurd3-Sep-04 2:11
umedkurd3-Sep-04 2:11 
AnswerRe: can not return com from c# Pin
Heath Stewart3-Sep-04 7:14
protectorHeath Stewart3-Sep-04 7:14 
GeneralRe: can not return com from c# Pin
umedkurd3-Sep-04 7:51
umedkurd3-Sep-04 7:51 
GeneralRe: can not return com from c# Pin
Heath Stewart3-Sep-04 8:15
protectorHeath Stewart3-Sep-04 8:15 
GeneralRe: can not return com from c# Pin
umedkurd3-Sep-04 18:34
umedkurd3-Sep-04 18:34 
GeneralRe: can not return com from c# Pin
Heath Stewart6-Sep-04 9:10
protectorHeath Stewart6-Sep-04 9:10 
Without seeing all the source code, all I can do is make educates "stabs in the dark", but hopefully we can resolve this. Usually the questions are a little more simple. Smile | :)

Are these interfaces declared in unmanaged code (i.e., in an IDL file and registered in HKCR\Interfaces)? If so, don't forget to attribute the re-declaration in managed code with ComImport. This ensures that the CLR performs a QueryInterface for the requested interface instead of just a cast.

If these interfaces are declared in managed code, IIRC they will not be registered in HKCR\Interfaces by regasm.exe. The easiest way to find out is to run regasm.exe /regfile:temp.reg Assembly.dll (replacing "Assembly.dll" with your assembly, of course). You could also generate a typelib and use oleview.exe Assembly.tlb for an IDL-like output, if you like.

If not registered, you can add a couple static parameterless methods and attribute them with the ComRegisterFunctionAttribute and ComUnregisterFunctionAttribute. Keep in mind that these methods are called by regasm.exe in addition to registering your types normally. No need to do the same thing twice.

Also be sure that if you don't install your assembly into the GAC, you use the /codebase option with regasm.exe to register the fully-qualified path to your assembly so that mscoree.dll knows where to find it. Since you can create instances of your COM servers, this doesn't sound like a problem.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: can not return com from c# Pin
umedkurd7-Sep-04 18:42
umedkurd7-Sep-04 18:42 
GeneralMultiple Document Intrface problem-Ineed help Pin
gijoebijoe3-Sep-04 2:05
gijoebijoe3-Sep-04 2:05 
GeneralRe: Multiple Document Intrface problem-Ineed help Pin
sreejith ss nair3-Sep-04 2:52
sreejith ss nair3-Sep-04 2:52 
GeneralExocortex.DSP question Pin
Shiro19813-Sep-04 1:56
Shiro19813-Sep-04 1:56 
QuestionIt allways prints to my default printer but i want to choose the printer in code? Pin
robmays3-Sep-04 1:55
robmays3-Sep-04 1:55 
GeneralCreating a XSLT File Pin
teo_x3-Sep-04 1:53
teo_x3-Sep-04 1:53 
GeneralRe: Creating a XSLT File Pin
sreejith ss nair3-Sep-04 2:55
sreejith ss nair3-Sep-04 2:55 

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.