Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ActiveX or COM or ...?

Reply
Thread Tools

ActiveX or COM or ...?

 
 
Randy Dietz
Guest
Posts: n/a
 
      01-20-2004
Mark, I just found my COM objects in oleview. They're named Crsd* not rsd*
but I still can't access them using COMAddIns in vc++. How can I use the
MSAccess CreateObject function with "c:\documents and settings\default\my
documents\visual studio projects\test9\debug\test9.dll" and it's class
Crsdm1? What is the syntax?

"Mark Schupp" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You do not use declare statements with com object.
>
> After the com object is compiled and registered you use CreateObject just

as
> you would for a built-in asp object.
>
> set myobj= createobject("mydll.myobject")
>
> Dim s1
>
> s1 = ""
>
> myobj.myfunc( s1 )
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "Randy Dietz" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > People in other newsgroups suggested posting here. A few people

recommend
> > using a COM Server or ATL Server but I tried that using
> > file|new|project|visual c++ projects|ATL|ATL project and couldn't get

VBA
> > code to recognize MyFunc99 maybe because my VBA Declare statement is
> > incorrect.
> >
> > In VBA I used
> >
> > Private Declare Sub MyFunc99 Lib "C:\Documents and Settings\default\My
> > Documents\Msaccess\Test4" (s1 As String)
> > ...
> > Dim s1 As String
> > MyFunc99 (s1)
> >
> > A summary of info and notes from myself and other posters...
> > 1. create a simple non-UI dll or component which will be used by MS

Access
> > and .ASP apps.
> > 2. use COM because .ASP can't use a DLL.
> > 3. the component needs to work on both non-.net and .net systems if
> > possible.
> >
> >
> > "Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
> > news:fD9A%(E-Mail Removed)...
> > > Hi Randy,
> > >
> > > Thank you for posting here. Regarding on the issue, I am
> > > finding proper resource to assist you and we will update as soon as

> > posible.
> > >
> > > Regards,
> > >
> > > Steven Cheng
> > > Microsoft Online Support
> > >
> > > Get Secure! www.microsoft.com/security(This posting is provided "AS

IS",
> > > with no warranties, and confers no rights.)
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
 
MSFT
Guest
Posts: n/a
 
      01-20-2004
Hi Randy,

From another message, I found youn saw Crsd* not rsd*. In fact, this name
is determined by the class name you defined in the .h file. You may open
the ATL project and check the .h file. By the way, for a ATL project, we
only need to compile it. regsvr32 is not necessary for local computer.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      01-20-2004
What error do you get from createobject?
show your code.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Randy Dietz" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Mark, I just found my COM objects in oleview. They're named Crsd* not

rsd*
> but I still can't access them using COMAddIns in vc++. How can I use the
> MSAccess CreateObject function with "c:\documents and settings\default\my
> documents\visual studio projects\test9\debug\test9.dll" and it's class
> Crsdm1? What is the syntax?
>
> "Mark Schupp" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > You do not use declare statements with com object.
> >
> > After the com object is compiled and registered you use CreateObject

just
> as
> > you would for a built-in asp object.
> >
> > set myobj= createobject("mydll.myobject")
> >
> > Dim s1
> >
> > s1 = ""
> >
> > myobj.myfunc( s1 )
> >
> > --
> > Mark Schupp
> > Head of Development
> > Integrity eLearning
> > www.ielearning.com
> >
> >
> > "Randy Dietz" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > People in other newsgroups suggested posting here. A few people

> recommend
> > > using a COM Server or ATL Server but I tried that using
> > > file|new|project|visual c++ projects|ATL|ATL project and couldn't get

> VBA
> > > code to recognize MyFunc99 maybe because my VBA Declare statement is
> > > incorrect.
> > >
> > > In VBA I used
> > >
> > > Private Declare Sub MyFunc99 Lib "C:\Documents and Settings\default\My
> > > Documents\Msaccess\Test4" (s1 As String)
> > > ...
> > > Dim s1 As String
> > > MyFunc99 (s1)
> > >
> > > A summary of info and notes from myself and other posters...
> > > 1. create a simple non-UI dll or component which will be used by MS

> Access
> > > and .ASP apps.
> > > 2. use COM because .ASP can't use a DLL.
> > > 3. the component needs to work on both non-.net and .net systems if
> > > possible.
> > >
> > >
> > > "Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
> > > news:fD9A%(E-Mail Removed)...
> > > > Hi Randy,
> > > >
> > > > Thank you for posting here. Regarding on the issue, I am
> > > > finding proper resource to assist you and we will update as soon as
> > > posible.
> > > >
> > > > Regards,
> > > >
> > > > Steven Cheng
> > > > Microsoft Online Support
> > > >
> > > > Get Secure! www.microsoft.com/security(This posting is provided "AS

> IS",
> > > > with no warranties, and confers no rights.)
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      01-21-2004
Hi Randy,

To use this ATL Class with createobject, you need:

CreateObject("ProjectName.ClassName")

Project name is the name for your ATL project and Class name is the name in
.h file

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
Type mismatch using Mozilla ActiveX in place of Microsoft WebBrowser? Noozer Firefox 0 05-19-2004 08:08 AM
Problems with ActiveX usage in C# usercontrol BestNews ASP .Net 0 08-20-2003 09:14 AM
My ATL com activex control not working in C# & VB .net Sunil George ASP .Net 1 08-06-2003 08:34 AM



Advertisments