Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    KSA - Riyadh
    Posts
    3

    Question Unanswered: How to use .dll file and its function in .asp page

    hi everyone,
    I have a small query regarding .dll file
    We are using RTA600 time and attendence machine to record the employee time table...
    We are using TSMCOM32.dll file to interface that machine with our aplication which has developed in visual basic.... Its working fine and well..

    Now i wanna make interface online... with .asp page
    The problem is when i am interfacing with VB6.0 i am installing the tsmcom32.dll file... I create a module and calling the necessary functions by referening tsmcom32.dll

    Public Declare Function TSMOpenComm Lib "TSMCOM32.DLL" (ByVal port As String, ByVal p1 As Long, ByVal p2 As Byte, ByVal p3 As Long, ByVal p4 As Long, ByVal p5 As Long, ByVal p6 As Long) As Integer

    if i wanna use the same function in asp .. i can't use the same way which i use in vb6.0...

    How to create an object of this tsmcom32.dll , and its .class so that i can access all the necessary gunctions...

    Pls assist me.. to complete this task

    best regards
    Manzoor

  2. #2
    Join Date
    Dec 2003
    Location
    Philippines
    Posts
    11

    Re: How to use .dll file and its function in .asp page

    Sadik, here's how you use a .dll in .asp:
    In Interdev, select Project References under Project menu. Select the TSMCOM32 on the list (it should be registered prior to this). In your global.asa a metadata tag should have been added referencing the TSMCOM32.dll.

    In your .asp page try this code:
    x = tsmcom32.

    When you type the dot after the tsmcom32 properties and methods of the tsmcom32.dll should appear. If not use the object browser in vb or interdev to see what is the libname of your TSMCOM32.DLL.
    Last edited by arnelR; 12-03-03 at 11:47.

  3. #3
    Join Date
    Jul 2003
    Location
    KSA - Riyadh
    Posts
    3

    Question Without registering .dll file how 2 use .dll file in .asp page

    Dear sir,
    Thanx for ur responce, when i try 2 register the tsmcom32.dll i am getting some error messages..

    TSMCOM32.dll file has Loaded , but the DllRegisterServer entry point not found.
    DllRegisterServer may not be exported, or a corrupt version of TSMCOM32.dll may be in memory , Consider PView to detect and remove it.

    I would like 2 know .. can i use this tsmcom32.dll file without registering.. if so how 2 use this .dll file .. and how to create metatag in global.asa file....

    After vreating metetag in .asa file how 2 create object and use the methods..

    Plz help me sir, i will be greatful 2 u

    Thanks and Regards
    Manzoor

  4. #4
    Join Date
    Dec 2003
    Location
    Philippines
    Posts
    11

    Re: Without registering .dll file how 2 use .dll file in .asp page

    Sadik,

    YOU CAN FIND MY ANSWERS BELLOW YOUR QUESTIONS....

    Dear sir,
    Thanx for ur responce, when i try 2 register the tsmcom32.dll i am getting some error messages..

    TSMCOM32.dll file has Loaded , but the DllRegisterServer entry point not found.
    DllRegisterServer may not be exported, or a corrupt version of TSMCOM32.dll may be in memory , Consider PView to detect and remove it.

    I would like 2 know .. can i use this tsmcom32.dll file without registering.. if so how 2 use this .dll file .. and how to create metatag in global.asa file....

    -->NO YOU CAN NOT USE THE DLL WITHOUT REGISTERING. THOSE ERRORS COME WHEN YOU DON'T HAVE THE RUNTIME REQUIRED BY THE DLL. WHERE DID YOU GET THE DLL? WAS IT DEVELOPED OR PURCHASED? YOU SHOULD HAVE THE REQUIRED DLL IN ORDER TO REGISTER IT. TRY UNREGISTER IT FIRST THEN TRY REGISTERING IT AGAIN. THE METATAG WILL AUTOMATICALLY BE CREATED WHEN YOU ADD THE DLL TO YOUR PROJECT. SEE MY PREVIOUS REPLY ON HOW TO ADD IT TO YOUR PROJECT. AS I SAID YOU CAN NOT ADD IT TO YOUR PROJECT UNLESS IT'S REGISTERED IN THE REGISTRY. IT WILL NOT APPEAR ON THE LIST OF CLASS YOU WANT TO ADD IN YOUR PROJECT.

    After vreating metetag in .asa file how 2 create object and use the methods..

    ---> THE COMMAND IN ASP TO CREATE OBJECT IS: SET MYOBJ = SERVER.CREATEOBJECT("CLASSNAME").

    MYOBJ NOW BECOMES YOUR DLL. ALL THE PROPERTIES AND METHODS WILL BE IN MYOBJ.

    Plz help me sir, i will be greatful 2 u

    Thanks and Regards
    Manzoor [/SIZE][/QUOTE]

Posting Permissions

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