Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
Generalsending mail with attachments Pin
Sprinkle19-Aug-03 7:57
Sprinkle19-Aug-03 7:57 
GeneralRe: sending mail with attachments Pin
Heath Stewart19-Aug-03 9:53
protectorHeath Stewart19-Aug-03 9:53 
QuestionDetermining radio button choice...??? Pin
vlusardi19-Aug-03 7:33
vlusardi19-Aug-03 7:33 
AnswerRe: Determining radio button choice...??? Pin
Heath Stewart19-Aug-03 9:56
protectorHeath Stewart19-Aug-03 9:56 
GeneralGIS in C# Pin
laphijia19-Aug-03 7:07
laphijia19-Aug-03 7:07 
GeneralUsing ActiveX control in C# Pin
Big Trev19-Aug-03 6:43
Big Trev19-Aug-03 6:43 
GeneralRe: Using ActiveX control in C# Pin
Stephane Rodriguez.19-Aug-03 8:45
Stephane Rodriguez.19-Aug-03 8:45 
GeneralRe: Using ActiveX control in C# Pin
Heath Stewart19-Aug-03 10:03
protectorHeath Stewart19-Aug-03 10:03 
As Stephane said, just use the "Add Reference..." and select the COM tab. You almost have the right idea, though.

Use aximp.exe to import an ActiveX control and create an interop assembly. DO NOT, however, register it! Regasm.exe is for registering assemblies that contain interop metadata, such as controls that act as ActiveX controls through a CCW (COM-Callable Wrapper). If you use Regasm.exe on the interop assembly generated by from the native ActiveX control, you've just overwritten the registry settings so that the interop assembly is now the target of the CLSID! Any application trying to instantiate your original ActiveX control is now instantiating (unknowingly in almost all cases) the control in the .NET assembly through a CCW. The interop assembly, however, is looking for the actual control and not finding it because it's finding itself!

Now, I would hope (and don't remember off the top of my head) that regasm.exe checks to see if the assembly was imported from an ActiveX control. But it if isn't, you need to use "regasm.exe /u myassembly.dll" immediately, and then use "regsvr32.exe myactivex.ocx" to fix the registry problems that are most likely affecting you.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Using ActiveX control in C# Pin
Big Trev19-Aug-03 21:32
Big Trev19-Aug-03 21:32 
GeneralRe: Using ActiveX control in C# Pin
Heath Stewart20-Aug-03 2:26
protectorHeath Stewart20-Aug-03 2:26 
GeneralRe: Using ActiveX control in C# Pin
Big Trev20-Aug-03 2:44
Big Trev20-Aug-03 2:44 
GeneralMicrosoft Word automation Pin
Radoslav Bielik19-Aug-03 6:35
Radoslav Bielik19-Aug-03 6:35 
GeneralRe: Microsoft Word automation Pin
Stephane Rodriguez.19-Aug-03 6:42
Stephane Rodriguez.19-Aug-03 6:42 
GeneralRe: Microsoft Word automation Pin
Radoslav Bielik19-Aug-03 7:16
Radoslav Bielik19-Aug-03 7:16 
GeneralAdd a progressbar to a statusbar... Pin
BoozeBomb19-Aug-03 4:18
BoozeBomb19-Aug-03 4:18 
GeneralRe: Add a progressbar to a statusbar... Pin
Heath Stewart19-Aug-03 10:04
protectorHeath Stewart19-Aug-03 10:04 
Questionany "smarter" to convert char[] to byte[]? Pin
zecodela19-Aug-03 0:32
zecodela19-Aug-03 0:32 
AnswerRe: any "smarter" to convert char[] to byte[]? Pin
Venkatraman19-Aug-03 2:24
Venkatraman19-Aug-03 2:24 
GeneralRe: any "smarter" to convert char[] to byte[]? Pin
Heath Stewart19-Aug-03 10:07
protectorHeath Stewart19-Aug-03 10:07 
GeneralDateTime manipulations Pin
kaloyan18-Aug-03 23:57
kaloyan18-Aug-03 23:57 
GeneralRe: DateTime manipulations Pin
Julian Bucknall [MSFT]19-Aug-03 7:28
Julian Bucknall [MSFT]19-Aug-03 7:28 
GeneralRe: DateTime manipulations Pin
kaloyan20-Aug-03 19:06
kaloyan20-Aug-03 19:06 
GeneralRe: DateTime manipulations Pin
Ista19-Aug-03 16:54
Ista19-Aug-03 16:54 
GeneralRe: DateTime manipulations Pin
Julian Bucknall [MSFT]20-Aug-03 17:39
Julian Bucknall [MSFT]20-Aug-03 17:39 
GeneralWhat's different between Component and Control Pin
Libra18-Aug-03 23:25
Libra18-Aug-03 23:25 

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.