Solved

Writing a DLL

Posted on 2002-04-10
6
401 Views
Last Modified: 2010-04-04
Hi there, all i want to do is call a DLL however all i have is VB source, if anyone understands VB which i don't could you please help?

the dll and source code is here http://geocities.com/tcjdelphi/messenger.zip but i think the part i want is here...

Private Type YMSG5_LOGIN
    ymsg5_id As String * 34

    ymsg5_pwd As String * 34
    encryption_string As String * 26
    encrypted_string1 As String * 26
    encrypted_string2 As String * 26

End Type

Private Declare Function YMSG5_GetLoginStrings Lib "YMSG5LOG.DLL" (LPYMSG5LOGIN As YMSG5_LOGIN) As Long

Private Step As Integer
Private Connected As Boolean
Private ymsg5_log As YMSG5_LOGIN

So far i have in Delphi this...


Type TYmsg = Record
  ymsg5_id: String[34];
  ymsg5_pwd: String[34];
  encryption_string: String[26];
  encrypted_string1: String[26];
  encrypted_string2: String[26];
 End;

Var
  Ymsg: ^TYmsg;

Tdump//
Section:             Exports
  Flags:             00000000
  Time Stamp:        3C915F88 : Fri Mar 15 12:12:16 2002
  Major Version:     0000
  Minor Version:     0000

Exports from YMSG5LOG.dll
  2 exported name(s), 2 export addresse(s).  Ordinal base is 1.
  Sorted by Name:
    RVA      Ord. Hint Name
    -------- ---- ---- ----
    000011EA    1 0000 YMSG5_CryptString
    00001014    2 0001 YMSG5_GetLoginStrings
//

I am not even sure if CryptString does anything...

Am i on the right track?

Thanks to anyone who can help me :)
0
Comment
Question by:craig_capel
  • 2
  • 2
  • 2
6 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 150 total points
ID: 6933248
Function YMSG5_GetLoginStrings(var LPYMSG5LOGIN: TYmsg): Integer; stdcall; external 'YMSG5LOG.DLL' name 'YMSG5_GetLoginStrings'

I guess you fill the structure with ID, Password then call the function and get a return value
the result values must be explained in the docs
0
 
LVL 2

Author Comment

by:craig_capel
ID: 6933350
yeah but is the pointer correct thing to do? since strings are Pchar?
0
 
LVL 2

Author Comment

by:craig_capel
ID: 6933470
yeah but is the pointer correct thing to do? since strings are Pchar?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6934474
it's ok because string[26] is an array of char and treated a bit differently than normal string
you can change that string[26] to "array[0..25] of char"
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9003090
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer from Lee_Nover

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010314
Thankyou for your response.

Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi application Soap connection 5 104
HTML text in the body of an email (delphi code) 12 120
select query - oracle 16 100
can i put an image from resource into image tag ? 6 25
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question