Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

[src] VB6 Plugin development example

Discussing issues that occur during plugin development.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
el coco
Posts: 3
Joined: August 23rd, 2009, 11:48 pm

[src] VB6 Plugin development example

Post by el coco »

Hi there. Well i'm new in this forum, but i want to contribute. I'm a VB6 coder, and i liked the way that LCDSmartie works, so i've developed this first plugin in VB6.
Yes, it's on VB6 without any wrappers, only with the VBAdvance Addin for VB's IDE. If some people worked with that addin, they will know that is possible to use all the VB functions on standard dlls, instead another ways that using VB functions will crash the application.

** if you don't have vbAdvance, you aren't able to compile this project... so, try to find vbAdvnace on google **

Well, for the Strings return on functions, i've used a trick. The code returns a Long value, that is a pointer to the String that you want to return.
That pointer it's a portion of memory, allocated by VirtualAlloc. And of course, when LCDSmartie calls the function again, the pointer used before its cleared and deallocated.

In this example, i've included 2 functions: a standard hello world and a function that says the name of the active window.
For the first function:

Code: Select all

$dll(cocuslcd,1,hello,other)
will return:

Code: Select all

VB6: hello ; other
Well, and the another function:

Code: Select all

$dll(cocuslcd,2,,)
will return the active window title, for example:

Code: Select all

LCD Smartie · Post a new topic - Mozilla Firefox
Ok, i hope you like it ;)...
It's under Creative Commons BY-NC license
Image

PD: Sorry for my bad english :P
You do not have the required permissions to view the files attached to this post.

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Re: [src] VB6 Plugin development example

Post by limbo »

Great work... Thanks for your example.

el coco
Posts: 3
Joined: August 23rd, 2009, 11:48 pm

Re: [src] VB6 Plugin development example

Post by el coco »

limbo wrote:Great work... Thanks for your example.
:D

if the project admins wants to add this example to the source of the next release, it will be great =)

Post Reply