Two file in te same namespace

  • Thread starter Thread starter SamSpade
  • Start date Start date
S

SamSpade

I have two files that use the same namespace, CAG.LibraryNS
The first is a CS file
The second is a VB file

The CS file defines a class, CsWinApi

The VB file tries to call a method in the CS file
hResult = CAG.LibraryNS.CsWinApi.SHGetMalloc(ShellMalloc)

But gets the error: CsWinApi is not a member of LibraryNS

Any idea what might be wrong??



Thanks
 
is CsWinApi a static class

if not you have to make a instance first

oCswa = new CAG.LibraryNS.CsWinApi();

and now

hResult = oCswa.SHGetMalloc(ShellMalloc)

MajorTom

PD: it's look to me the problem is not related to the diferent file in the
same name space
 
Thanks a lot, I got it working.

MajorTom said:
is CsWinApi a static class

if not you have to make a instance first

oCswa = new CAG.LibraryNS.CsWinApi();

and now

hResult = oCswa.SHGetMalloc(ShellMalloc)

MajorTom

PD: it's look to me the problem is not related to the diferent file in the
same name space
 
Back
Top