I am new to Tapi in VB6 , I have a tapi
sdk installed, I am trying to translate some of the functions from the C++ documentaion to VB I am running into a problem with lineInitializeEx.

I am declaring it like this

Private Declare Function lineInitializeEx Lib "TAPI32.DLL" Alias "lineInitializeExA" (ByVal lphLineApp _
                    As String, ByVal hInstance As String, ByVal lpfnCallBack As String, _
                    ByVal lpszFriendlyAppName As String, ByVal lpdwNumDevs As String, _
                    ByVal lpdwAPIVersion As String, ByVal LINEINITIALIZEEXPARAMS) As Long

but every time I call it I get this error:

Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types

Help any body  
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In your DECLARE line, you have:


Don't you need to do something like this:

   ..., ByVal linit As LINEINITIALIZEEXPARAMS) As Long

Also, LINEINITIALIZEEXPARAMS should be a PUBLIC TYPE definition...

See my complete TAPI 2.1 example at Shrinkwrap Visual Basic for how to use LineInitializeEx from VB.

Hope this helps,
Ray Mercer
MS-MVP Visual Basic

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.