Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / September 2004



Tip: Looking for answers? Try searching our database.

Help with first DLL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Webbee - 30 Sep 2004 18:39 GMT
Ok I started this post in another thread but the topic I think should be
placed here based on my current status.

I have built a DLL that returns this error when accessed from an ASP page:
DDE Error:369 :Operation not valid in an ActiveX DLL

Here is the code:
Public Function DDEInitiate() As String

On Error GoTo Err_DDE

   With lblGMDDE
       .LinkMode = vbLinkNone
       .LinkTopic = "GoldMine|Data"
       .LinkMode = vbLinkManual
       
       .LinkItem = "&UserName"
       .LinkRequest
       DDEInitiate = .Caption
   End With
   
   Exit Function
   
Err_DDE:
   If Err = 282 Then
       DDEInitiate = 282
   Else
       'Err.Description = "DDE Error:" & Err & " :" & Err.Description
       DDEInitiate = "DDE Error:" & Err & " :" & Err.Description
   End If
   
End Function

Nothing really fancy and I run it from a Class called GM with this Functions:
Public Function GetUserID() As String
   GetUserID = frmDDE.DDEInitiate
End Function

Again, nothing really fancy but yet I still get stumped.
Webbee - 30 Sep 2004 20:15 GMT
Ok I changed the DLL to an EXE and that helps. If I reference this from
another VB program it works great! But if I reference this from an ASP page I
get a 282 error. Here is the ASP page code that I'm using.

<% Option Explicit

    Dim oGMUser 'Create an object for the component
    Dim Username 'Create a string to hold the result
   
    'Create an instance of the Component we just wrote
    Set oGMUser = CreateObject("GMCurrentUser.GM_Class")
   
    'Call the IsLeapYear function in our component, and
    'store the result
    UserName = oGMUser.GetUserID
   
    'Close the instance, good programming practice
    Set oGMUser = Nothing

%>
<HTML>
<HEAD>
<TITLE>Gm User</TITLE>
</HEAD>
<BODY>
<%
    'Let the user know
        Response.Write UserName
%>
</BODY>
</HTML>

> Ok I started this post in another thread but the topic I think should be
> placed here based on my current status.
[quoted text clipped - 35 lines]
>
> Again, nothing really fancy but yet I still get stumped.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.