Solved

Writing a DLL

Posted on 2002-04-10
6
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

717 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