Solved

Writing a DLL

Posted on 2002-04-10
6
398 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now