Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
Generalpassing strings between ATL and c# Pin
rana7415-Apr-04 16:25
rana7415-Apr-04 16:25 
GeneralRe: passing strings between ATL and c# Pin
Mike Dimmick16-Apr-04 1:01
Mike Dimmick16-Apr-04 1:01 
GeneralRe: passing strings between ATL and c# Pin
RNEELY16-Apr-04 7:03
RNEELY16-Apr-04 7:03 
Generalerror progation from ATL to c# Pin
rana7415-Apr-04 16:24
rana7415-Apr-04 16:24 
GeneralRe: error progation from ATL to c# Pin
Mike Dimmick16-Apr-04 2:30
Mike Dimmick16-Apr-04 2:30 
QuestionCalling COM methods from a module NOT ALLOWED? Pin
normanordas15-Apr-04 15:28
normanordas15-Apr-04 15:28 
AnswerRe: Calling COM methods from a module NOT ALLOWED? Pin
Mike Dimmick16-Apr-04 0:59
Mike Dimmick16-Apr-04 0:59 
GeneralRe: Calling COM methods from a module NOT ALLOWED? Pin
normanordas16-Apr-04 3:00
normanordas16-Apr-04 3:00 
No. I have a third party COM API(Neteng.tlb file) which is full COM compliant. I used this COM object in my VB 6 programs by adding a reference to it. When i browse its library thru Object Browser i noticed it has a lot of enumerations(enum in c#) and types(struct in c#) defined. It also exposes one method (NE_AddElement) but this is a MEMBER of a Module.

-----------------------------------------------------------------
It says in Object Browser like...

Sub NE_AddElement(netedit As Long, elatt As ElementAttRec)
Member of NETENG.NETENGAPI
Add the given element using the specified element record.

WHERE NETENGAPI IS...

Module NETENGAPI
Member of NETENG

-----------------------------------------------------------------

That means that this method belongs to the Module not to the class so after i made a reference to the COM i can automatically used the NE_AddElement method defined there and it works fine. My VB 6 program can recognized the method.

Now i tried using the same COM API (Neteng.tlb) inside a VB.Net/C#. I made a reference to that COM API (as a COM object) inside my VS.NET IDE using the COM portion and it goes fine. I was successful at doing that but when i compile the code it RETURNED a compilation error saying:
----------
The name 'NE_AddElement' does not exist in the class "myclass name here"(CS0103)
----------

Why is that it can't recognized the NE_AddElement method though i have successfully Add a Reference to its COM? When i checked the equivalent InterOp assembly created after making the referencing i noticed it only exposes the class level enumerations and class level structs. Members of NETENGAPI (a Module) like the method NE_AddElement were not exposed. In VB 6 it can recognized the method as member of the NETENGAPI module. Can someone tell me how My VB.NET/C# program can fully recognized and in doing so used the NE_AddElement method!!!! Tnx in advanced!!!
AnswerRe: Calling COM methods from a module NOT ALLOWED? Pin
Heath Stewart16-Apr-04 4:10
protectorHeath Stewart16-Apr-04 4:10 
GeneralRe: Calling COM methods from a module NOT ALLOWED? Pin
normanordas18-Apr-04 15:45
normanordas18-Apr-04 15:45 
GeneralRe: Calling COM methods from a module NOT ALLOWED? Pin
Heath Stewart19-Apr-04 2:22
protectorHeath Stewart19-Apr-04 2:22 
QuestionHow do you deal with checkboxes in C#??? Pin
adonisv15-Apr-04 10:43
adonisv15-Apr-04 10:43 
AnswerRe: How do you deal with checkboxes in C#??? Pin
Judah Gabriel Himango15-Apr-04 10:50
sponsorJudah Gabriel Himango15-Apr-04 10:50 
AnswerRe: How do you deal with checkboxes in C#??? Pin
Daniel Turini15-Apr-04 10:55
Daniel Turini15-Apr-04 10:55 
GeneralWhat a coincidence! Pin
adonisv15-Apr-04 12:01
adonisv15-Apr-04 12:01 
AnswerRe: How do you deal with checkboxes in C#??? Pin
Nnamdi Onyeyiri15-Apr-04 11:01
Nnamdi Onyeyiri15-Apr-04 11:01 
GeneralSetup Project with Crystal Pin
hxxbin15-Apr-04 10:22
hxxbin15-Apr-04 10:22 
GeneralRe: Setup Project with Crystal Pin
Heath Stewart15-Apr-04 11:10
protectorHeath Stewart15-Apr-04 11:10 
GeneralRe: Setup Project with Crystal Pin
hxxbin16-Apr-04 3:47
hxxbin16-Apr-04 3:47 
GeneralRe: Setup Project with Crystal Pin
hxxbin16-Apr-04 6:35
hxxbin16-Apr-04 6:35 
GeneralRe: Setup Project with Crystal Pin
Heath Stewart16-Apr-04 6:37
protectorHeath Stewart16-Apr-04 6:37 
GeneralRe: Setup Project with Crystal Pin
Braulio Dez15-Apr-04 23:40
Braulio Dez15-Apr-04 23:40 
GeneralRe: Setup Project with Crystal Pin
Braulio Dez15-Apr-04 23:41
Braulio Dez15-Apr-04 23:41 
GeneralRe: Setup Project with Crystal Pin
hxxbin16-Apr-04 3:46
hxxbin16-Apr-04 3:46 
GeneralRe: Setup Project with Crystal Pin
hxxbin16-Apr-04 4:37
hxxbin16-Apr-04 4:37 

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.