Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Vb6 - Filter Plugin, How to create a VB6 filter plugin?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
reexre
  Posted: Nov 2 2011, 02:44 PM


Newbie


Group: Members
Posts: 2
Member No.: 33505
Joined: 2-November 11



Hi
I developed a picture abstraction filter http://www.youtube.com/watch?v=srFUdEOhWtk...lf=list_related

The code is written in VB6

I'd like to know how to make a VirtualDub plugin .(and filter dialog) in VB6

Problem is that I don't know nothing about how to build a plugin and
that the code is written in VB6.

but it should be possible.. isn't it?

 
     Top
dloneranger
Posted: Nov 2 2011, 03:15 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



It'd probably be easier to just rewrite the algorithm in c++ so you could use the existing sdk


--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
phaeron
Posted: Nov 6 2011, 10:38 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



I did a little research on VB6's DLL capabilities, and I don't believe it is possible to directly create a VirtualDub plugin with it, for two reasons: inability to call functions with __cdecl calling convention, and inability to export DLL functions. You might be able to hack around the latter with the linker, but you would need a C/C++ shim to work around the former.
 
    Top
reexre
Posted: Nov 7 2011, 07:54 PM


Newbie


Group: Members
Posts: 2
Member No.: 33505
Joined: 2-November 11



thanks for replaies

phaeron
and what about VB.NET ?
 
     Top
MrSmite
Posted: Nov 10 2011, 06:51 AM


Advanced Member


Group: Members
Posts: 102
Member No.: 25620
Joined: 30-May 09



Unfortunately Phaeron is correct. There is no easy way to call CDECL functions from VB6 although it isn't too much of a hack to export functions. I've been programming in VB for over 10 years, here are a few things you might find interesting:

For calling CDECL, the easiest way is to write a wrapper DLL in C++ that exports STDCALL
functions which simply call the CDECL functions. You can then declare/call the STDCALL ones from inside VB.

http://support.microsoft.com/kb/153586

For the exporting issue, VB uses the same linker/compiler as C++ but just passes different parameters. Notably, there is no /DEF switch. If you intercept the call and add the /DEF switch, you can supply a DEF file with your exports.

There is detailed information here (pages 2 and 3) on writing a proxy linker (easy):

http://windowsdevcenter.com/pub/a/windows/...create_dll.html
 
     Top
phaeron
Posted: Nov 20 2011, 07:59 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



VB.NET is even less recommended than VB6. You still have to hack the build process in order to export a DLL entry point ("reverse P/Invoke"), but you also have the additional headache of bringing in the .NET Framework and marshaling data between the GC and native heap and potential problems down the line with trying to load multiple versions of the CLR in the same process.
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
5 replies since Nov 2 2011, 02:44 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development