Trouble with dll file

Results 1 to 3 of 3

Thread: Trouble with dll file

  1. #1
    Join Date
    Dec 1969

    Default Trouble with dll file

    I&#039;ve been trying to get this ActiveX_dll file to work with an asp page I&#039;ve made but I cant seem to get it to work.<BR><BR>This is what I&#039;ve done.<BR><BR>Started vb6.0, choose, activeX, added Microsoft Outlook object library, called the project &#039;project1&#039;, (class is called &#039;class1&#039;) here is the code :<BR><BR>Public sub mail(recipient as string)<BR>Dim o1 as outlook.application<BR>Dim e1 as outlook.MailItem<BR><BR>Set e1. = o1.CreateItem(oiMailItem)<BR><BR> = recipient<BR>e1.display<BR>End sub<BR><BR>Saved it and the made a dll file called aspmail.dll<BR><BR>I registered the dll file on my win2000 pc, regsvr<BR>c:winntsystem32aspmail.dll and it went ok.<BR><BR>Here is asp code :<BR><BR>&#060;%<BR>Set myObject = Server.CreateObject(project1.class1)<BR>Myobject.M ail ""<BR>%&#062;<BR><BR>I get &#039;object variabel or with block variabel not set&#039; error in browser when<BR>trying to run it.<BR><BR>Anyone got a clue whats wrong ? Is it dll error or asp error or what ?<BR><BR>Cheers<BR><BR>Lars

  2. #2
    akram Guest

    Default RE: Trouble with dll file

    you have to set the object o1 ; try this <BR><BR>set o1 = new outlook.application<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Trouble with dll file

    I am not sure if you know that most of the time this error occurs when variable (or object) is not set and declared.<BR>if you have option explicit set in your asp, do <BR>dim myObject first.. or else<BR>Set myObject = Server.CreateObject("project1.class1") should work. Did you use double quotes because you didn&#039;t type them here.<BR><BR>Hope this helps<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts