Connecting Tech Pros Worldwide Forums | Help | Site Map

ActiveX or COM or ...?

Randy Dietz
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi, how can I create a simple non-UI dll or component which will be used by
MS Access and .ASP apps which I can build with Visual C++ .net? An example
or template which would allow me to paste in C code without learning all the
C++ details would be perfect.

Thanks,
Randy



Mark Schupp
Guest
 
Posts: n/a
#2: Jul 19 '05

re: ActiveX or COM or ...?


MSVC++ has wizards to create server-side com objects. I would expect that
C++ .net would as well. There should also be some sample code available as
well.

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


"Randy Dietz" <spam9@spam9.com> wrote in message
news:OnoHUcI3DHA.3196@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hi, how can I create a simple non-UI dll or component which will be used[/color]
by[color=blue]
> MS Access and .ASP apps which I can build with Visual C++ .net? An[/color]
example[color=blue]
> or template which would allow me to paste in C code without learning all[/color]
the[color=blue]
> C++ details would be perfect.
>
> Thanks,
> Randy
>
>[/color]


Guest
 
Posts: n/a
#3: Jul 19 '05

re: ActiveX or COM or ...?


Why dont you try to use VB5/6/VB.NET for example if C++ like syntax is not
the one that you like?

"Randy Dietz" <spam9@spam9.com> wrote in message
news:OnoHUcI3DHA.3196@TK2MSFTNGP11.phx.gbl...
: Hi, how can I create a simple non-UI dll or component which will be used
by
: MS Access and .ASP apps which I can build with Visual C++ .net? An
example
: or template which would allow me to paste in C code without learning all
the
: C++ details would be perfect.
:
: Thanks,
: Randy
:
:


Steven Cheng[MSFT]
Guest
 
Posts: n/a
#4: Jul 19 '05

re: ActiveX or COM or ...?


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.)

Randy Dietz
Guest
 
Posts: n/a
#5: Jul 19 '05

re: ActiveX or COM or ...?


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]" <v-schang@online.microsoft.com> wrote in message
news:fD9A%23hM3DHA.2996@cpmsftngxa07.phx.gbl...[color=blue]
> 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[/color]
posible.[color=blue]
>
> 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.)
>[/color]


Randy Dietz
Guest
 
Posts: n/a
#6: Jul 19 '05

re: ActiveX or COM or ...?


Class view shows that rsdm2() is exported I think...

Test4
...
Irsd2
...
rsdm2(BSTR *s1)

and the build log shows that regsvr32 test4.dll registers the dll so how do
I get MS Access to use the dll? Tools|ActiveX Controls lists many controls
but no rsd* nor test4* symbols.

Build Log ------- Build started: Project: test4, Configuration:
Debug|Win32 -------

Command Lines Creating temporary file "c:\Documents and
Settings\default\My Documents\Visual Studio
Projects\test4\Debug\RSP000013.rsp" with contents
[
/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_USRDLL" /D "_ATL_ATTRIBUTES"
/D "_WINDLL" /D "_ATL_STATIC_REGISTRY" /D "_MBCS" /Gm /EHsc /RTC1 /MDd
/Yu"stdafx.h" /Fp"Debug/test4.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c
/Wp64 /ZI /TP
".\toupper.cpp"
".\test4.cpp"
".\rsd2.cpp"
".\rsd1.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\RSP000013.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\RSP000014.rsp" with contents
[
/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_USRDLL" /D "_ATL_ATTRIBUTES"
/D "_WINDLL" /D "_ATL_STATIC_REGISTRY" /D "_MBCS" /Gm /EHsc /RTC1 /MDd
/Yc"stdafx.h" /Fp"Debug/test4.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c
/Wp64 /ZI /TP
".\stdafx.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\RSP000014.rsp" /nologo"
Creating command line "rc.exe /d "_DEBUG" /l 0x409 /I "Debug"
/fo"Debug/test4.res" ".\test4.rc""
Creating temporary file "c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\RSP000015.rsp" with contents
[
/OUT:"Debug/test4.dll" /INCREMENTAL /NOLOGO /DLL /IDLOUT:"_test4.idl" /DEBUG
/PDB:"Debug/test4.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Debug/test4.lib"
/MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib
".\Debug\rsd1.obj"
".\Debug\rsd2.obj"
".\Debug\stdafx.obj"
".\Debug\test4.obj"
".\Debug\toupper.obj"
".\Debug\test4.res"
]
Creating command line "link.exe @"c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\RSP000015.rsp""
Creating temporary file "c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\BAT000016.bat" with contents
[
@echo off
cd .\Debug
regsvr32 /s "test4.dll"
]
Creating command line ""c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\BAT000016.bat""
Creating temporary file "c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\BAT000017.bat" with contents
[
@echo off
regsvr32 /s /c "c:\Documents and Settings\default\My Documents\Visual Studio
Projects\test4\Debug\test4.dll"
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Performing
registration"
exit 1
:VCEnd
]
Creating command line ""c:\Documents and Settings\default\My
Documents\Visual Studio Projects\test4\Debug\BAT000017.bat""
Output Window Compiling...
stdafx.cpp
Compiling...
toupper.cpp
test4.cpp
rsd2.cpp
rsd1.cpp
Generating Code...
Compiling resources...
Linking...
Creating library Debug/test4.lib and object Debug/test4.exp
Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0361
Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.
Processing .\_test4.idl
_test4.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\prsht.idl
prsht.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\wtypes.idl
wtypes.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\basetsd.h
basetsd.h
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\guiddef.h
guiddef.h
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\mshtml.idl
mshtml.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\ocidl.idl
ocidl.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oleidl.idl
oleidl.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\objidl.idl
objidl.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\unknwn.idl
unknwn.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oaidl.idl
oaidl.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\servprov.idl
servprov.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\urlmon.idl
urlmon.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\msxml.idl
msxml.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\dimm.idl
dimm.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\mshtmhst.idl
mshtmhst.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\docobj.idl
docobj.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\exdisp.idl
exdisp.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\objsafe.idl
objsafe.idl
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\oaidl.acf
oaidl.acf
Processing C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\include\ocidl.acf
ocidl.acf
Registering output...
Performing registration
Results Build log was saved at "file://c:\Documents and
Settings\default\My Documents\Visual Studio
Projects\test4\Debug\BuildLog.htm"
test4 - 0 error(s), 0 warning(s)

"Randy Dietz" <spam9@spam9.com> wrote in message
news:%23Ck7dbT3DHA.2136@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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]" <v-schang@online.microsoft.com> wrote in message
> news:fD9A%23hM3DHA.2996@cpmsftngxa07.phx.gbl...[color=green]
> > 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[/color]
> posible.[color=green]
> >
> > 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.)
> >[/color]
>
>[/color]


MSFT
Guest
 
Posts: n/a
#7: Jul 19 '05

re: ActiveX or COM or ...?


Hi Randy,

hank you for using MSDN Newsgroup. I am Luke and I am review this issue
currently. As I understand, you want to create a component with VC++.NET
which can be used both in .NET application and Access application. Based on
the requirement, I think Class Library (.NET) should be a proper solution.
(File/New?Project/VC++ Project/Class Library (.NET) ). You can add your
functions in the source file and compile it to a DLL files.

To use the DLL file in another dot application, you can select "Project/Add
a reference", select the DLL file and add the reference file.

To use it in Access application, you first need register it as a COM
librrary with a utility "Regasm.exe":

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfassemblyregistrationtoolregasmexe.asp

In Access, you can click menu "Tool/Reference" and find the type library in
the list.

Hope this help,

Luke
Microsoft Online Support

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

Mark Schupp
Guest
 
Posts: n/a
#8: Jul 19 '05

re: ActiveX or COM or ...?


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" <spam9@spam9.com> wrote in message
news:%23Ck7dbT3DHA.2136@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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]" <v-schang@online.microsoft.com> wrote in message
> news:fD9A%23hM3DHA.2996@cpmsftngxa07.phx.gbl...[color=green]
> > 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[/color]
> posible.[color=green]
> >
> > 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.)
> >[/color]
>
>[/color]


Randy Dietz
Guest
 
Posts: n/a
#9: Jul 19 '05

re: ActiveX or COM or ...?


Luke, several others suggested that a COM object will work with both
MSAccess and .ASP. I used oleview.exe 'object classes->all objects' and
there are no rsd* objects so it appears that regsvr32 fails when the vc++
build calls it even though there are no err messages. I copied and built

LABRADOR Sample: Implements a Server with an Out-of-Proc Custom Interface
and Compiler COM Support

then tried oleview and LABRADOR is listed under 'object classes->all objects
' so I must be missing something in my project.


I started over and did...

create test9 with file|new|project|visual c++ projects|ATL|ATL project
right-click test9 in solution explorer
add the rsdm1 class using add|add class|visual c++|ATL|ATL Simple Object
rebuild all and the build log has

regsvr32 /s /c "c:\documents and settings\default\my documents\visual studio
projects\test9\debug\test9.dll"

run oleview.exe 'object classes->all objects' and there are no rsd* objects
listed.

Do I need to do something more to make rsdm1 a COM object or am I missing
something else?


"MSFT" <lukezhan@online.microsoft.com> wrote in message
news:z2cmtKm3DHA.2996@cpmsftngxa07.phx.gbl...[color=blue]
> Hi Randy,
>
> hank you for using MSDN Newsgroup. I am Luke and I am review this issue
> currently. As I understand, you want to create a component with VC++.NET
> which can be used both in .NET application and Access application. Based[/color]
on[color=blue]
> the requirement, I think Class Library (.NET) should be a proper solution.
> (File/New?Project/VC++ Project/Class Library (.NET) ). You can add your
> functions in the source file and compile it to a DLL files.
>
> To use the DLL file in another dot application, you can select[/color]
"Project/Add[color=blue]
> a reference", select the DLL file and add the reference file.
>
> To use it in Access application, you first need register it as a COM
> librrary with a utility "Regasm.exe":
>
>[/color]
http://msdn.microsoft.com/library/de...us/cptools/htm[color=blue]
> l/cpgrfassemblyregistrationtoolregasmexe.asp
>
> In Access, you can click menu "Tool/Reference" and find the type library[/color]
in[color=blue]
> the list.
>
> Hope this help,
>
> Luke
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>[/color]


Randy Dietz
Guest
 
Posts: n/a
#10: Jul 19 '05

re: ActiveX or COM or ...?


When I run

regsvr32 /c "c:\documents and settings\default\my documents\visual studio
projects\test9\debug\test9.dll"

I get a messagebox that says

DllRegister in c:\documents and settings\default\my documents\visual studio
projects\test9\debug\test9.dll succeeded.

but oleview doesn't list any rsd* objects.


"MSFT" <lukezhan@online.microsoft.com> wrote in message
news:z2cmtKm3DHA.2996@cpmsftngxa07.phx.gbl...[color=blue]
> Hi Randy,
>
> hank you for using MSDN Newsgroup. I am Luke and I am review this issue
> currently. As I understand, you want to create a component with VC++.NET
> which can be used both in .NET application and Access application. Based[/color]
on[color=blue]
> the requirement, I think Class Library (.NET) should be a proper solution.
> (File/New?Project/VC++ Project/Class Library (.NET) ). You can add your
> functions in the source file and compile it to a DLL files.
>
> To use the DLL file in another dot application, you can select[/color]
"Project/Add[color=blue]
> a reference", select the DLL file and add the reference file.
>
> To use it in Access application, you first need register it as a COM
> librrary with a utility "Regasm.exe":
>
>[/color]
http://msdn.microsoft.com/library/de...us/cptools/htm[color=blue]
> l/cpgrfassemblyregistrationtoolregasmexe.asp
>
> In Access, you can click menu "Tool/Reference" and find the type library[/color]
in[color=blue]
> the list.
>
> Hope this help,
>
> Luke
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>[/color]


Randy Dietz
Guest
 
Posts: n/a
#11: Jul 19 '05

re: ActiveX or COM or ...?


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" <mschupp@ielearning.com> wrote in message
news:uBPxULr3DHA.1760@TK2MSFTNGP10.phx.gbl...[color=blue]
> You do not use declare statements with com object.
>
> After the com object is compiled and registered you use CreateObject just[/color]
as[color=blue]
> 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" <spam9@spam9.com> wrote in message
> news:%23Ck7dbT3DHA.2136@TK2MSFTNGP12.phx.gbl...[color=green]
> > People in other newsgroups suggested posting here. A few people[/color][/color]
recommend[color=blue][color=green]
> > 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[/color][/color]
VBA[color=blue][color=green]
> > 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[/color][/color]
Access[color=blue][color=green]
> > 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]" <v-schang@online.microsoft.com> wrote in message
> > news:fD9A%23hM3DHA.2996@cpmsftngxa07.phx.gbl...[color=darkred]
> > > 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[/color]
> > posible.[color=darkred]
> > >
> > > Regards,
> > >
> > > Steven Cheng
> > > Microsoft Online Support
> > >
> > > Get Secure! www.microsoft.com/security(This posting is provided "AS[/color][/color][/color]
IS",[color=blue][color=green][color=darkred]
> > > with no warranties, and confers no rights.)
> > >[/color]
> >
> >[/color]
>
>[/color]


MSFT
Guest
 
Posts: n/a
#12: Jul 19 '05

re: ActiveX or COM or ...?


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.)

Mark Schupp
Guest
 
Posts: n/a
#13: Jul 19 '05

re: ActiveX or COM or ...?


What error do you get from createobject?
show your code.

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


"Randy Dietz" <spam9@spam9.com> wrote in message
news:%232rKxxv3DHA.1264@TK2MSFTNGP11.phx.gbl...[color=blue]
> Mark, I just found my COM objects in oleview. They're named Crsd* not[/color]
rsd*[color=blue]
> 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" <mschupp@ielearning.com> wrote in message
> news:uBPxULr3DHA.1760@TK2MSFTNGP10.phx.gbl...[color=green]
> > You do not use declare statements with com object.
> >
> > After the com object is compiled and registered you use CreateObject[/color][/color]
just[color=blue]
> as[color=green]
> > 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" <spam9@spam9.com> wrote in message
> > news:%23Ck7dbT3DHA.2136@TK2MSFTNGP12.phx.gbl...[color=darkred]
> > > People in other newsgroups suggested posting here. A few people[/color][/color]
> recommend[color=green][color=darkred]
> > > 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[/color][/color]
> VBA[color=green][color=darkred]
> > > 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[/color][/color]
> Access[color=green][color=darkred]
> > > 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]" <v-schang@online.microsoft.com> wrote in message
> > > news:fD9A%23hM3DHA.2996@cpmsftngxa07.phx.gbl...
> > > > 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[/color][/color]
> IS",[color=green][color=darkred]
> > > > with no warranties, and confers no rights.)
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


MSFT
Guest
 
Posts: n/a
#14: Jul 19 '05

re: ActiveX or COM or ...?


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.)

Closed Thread