• Print

Author Topic: hi,how i can use dll in qb64 like vb6 ??  (Read 454 times)

Atabey72

  • Newbie
  • *
  • Posts: 3
hi,how i can use dll in qb64 like vb6 ??
« on: August 12, 2017, 08:48:22 am »
hi ,

there is my codes in vb6 :

Private Declare Function Login Lib "XXXX.dll" (ByVal ModuleID As String, ByVal DeviceParameter As String) As String
Private Declare Function CheckLicence Lib "XXXX.dll" (ByVal SessionID As String, ByVal LicenceKey As String) As String

 Public Property Get MyCheck() As String
   
    session_id = Login("Modul No", "Device Paremeter") ' modul and  DeviceParameter  is string constant
    MyCheck = CheckLicence(session_id, "New Codes")  ' New Codes is a very long string  (120 charecter) constant
 
     End Property


how can i write tihs codes in QB64 ???

Ashish

  • Hero Member
  • *****
  • Posts: 536
  • Eat.... Sleep.... CODE.... Repeat.....
Re: hi,how i can use dll in qb64 like vb6 ??
« Reply #1 on: August 13, 2017, 03:33:45 am »
if (Me.Success) {Me.Improve();} else {Me.TryAgain();}

aKFrameWork - http://bit.ly/aKFrameWork
p5js.bas - http://bit.ly/p5jsbas
Menu System - http://bit.ly/guiMenuBar

OpenGL Demos - http://bit.ly/openGLdemos

Clippy

  • Hero Member
  • *****
  • Posts: 19400
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
QB64 WIKI: Main Page
Download Q-Basics Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
QB64 SDL

eoredson

  • Hero Member
  • *****
  • Posts: 534
  • God Bless America!
    • QB45 Oredson files at Filegate Network
Re: hi,how i can use dll in qb64 like vb6 ??
« Reply #3 on: December 27, 2017, 05:05:19 pm »
You could try something like this:

Code: [Select]
DECLARE DYNAMIC LIBRARY "XXXX"
    FUNCTION Login& (ModuleID$, DeviceParameter$)
    FUNCTION CheckLicence& (BYVAL SessionID&, LicenceKey$)
END DECLARE

session_id& = Login("Modul No" + CHR$(0), "Device Paremeter" + CHR$(0)) ' modul and  DeviceParameter  is string constant
MyCheck& = CheckLicence(session_id&, "New Codes" + CHR$(0)) ' New Codes is a very long string  (120 charecter) constant

Games: DNDDOOR - https://bit.ly/EriksDNDDoor DUNGEON - https://bit.ly/EriksDungeon
Interpreter - https://bit.ly/EriksSICK Hex Editor - https://bit.ly/EriksHexEditor
Utilities - https://bit.ly/EriksUtils Old QB64 - https://bit.ly/OldQB64
QB64 shell - https://bit.ly/QB64shell

  • Print