[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

Writing a DLL

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
craig_capel
Asked:
craig_capel
  • 2
  • 2
  • 2
1 Solution
 
Lee_NoverCommented:
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
 
craig_capelAuthor Commented:
yeah but is the pointer correct thing to do? since strings are Pchar?
0
 
craig_capelAuthor Commented:
yeah but is the pointer correct thing to do? since strings are Pchar?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Lee_NoverCommented:
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
 
pnh73Commented:
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
 
pnh73Commented:
Thankyou for your response.

Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now