?
Solved

Writing a DLL

Posted on 2002-04-10
6
Medium Priority
?
405 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 450 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
Independent Software Vendors: 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 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