Wrox Programmer Forums
|
Visual Basic 2010 General Discussion For any discussions about Visual Basic 2010 topics which aren't related to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2010, 07:35 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default API Calling

Hi All,

I have a problem, involving c++ and vb.net api calling.

I want to read ID3 tags, any version of them 1 - 2.4! I have found this fully compiled c++ project from id3lib.sourceforge.net.

It comes in the form of dll (obviously) but you cant just import that into vb and access its functions because its not an active x or a com component, or something along those lines, basically I can't access it.

However I have just had a look on line about API calling, so I know roughly how it could be done from vb, like importing the interop class and doing a DLL import, however I do not fully understand the arguments that could be parsed. for example:

Code:
<DllImport("KERNEL32.DLL", EntryPoint:="GetSystemDirectoryW", _
       SetLastError:=True, CharSet:=CharSet.Unicode, _
       ExactSpelling:=True, _
       CallingConvention:=CallingConvention.StdCall)> _
       Public Shared Function GetSystemDirectory(ByVal Buffer _
         As StringBuilder, ByVal Size As Integer) As Long
        ' Leave function empty - DLLImport attribute 
        ' forces calls to GetSystemDirectory to
        ' be forwarded to GetSystemDirectory in KERNEL32.DLL
    End Function
This apparently can access the GetSystemDirectory function from the kernel 32 dll! However I don't understand where the setlasterror comes from and all the rest?! I guess that when it starts with the shared function everything in the brackets will be the arguments as the c++ code intended so thats easy enough, however I would like everything explained, or sent to a place where everything is explained explicitly!

Cheers
__________________
Apocolypse2005, I'm a programmer - of sorts.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Facebook api vs Twitter api aspless Classic ASP Basics 4 September 11th, 2017 08:51 AM
API mallik C++ Programming 2 February 20th, 2008 04:03 AM
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM
API Panduchandra Visual C++ 1 March 27th, 2006 11:48 PM
about visit c-api 6cet6 VS.NET 2002/2003 0 March 25th, 2004 06:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.