Solved

Link C static lib with VB?

Posted on 2001-08-01
7
361 Views
Last Modified: 2012-08-13
I have a static .lib or .obj file that was written in Visual C that I need to link into a VB application... can anyone tell me if this is possible and if so, how it is done?  Building the lib as a DLL is not an option... it must be statically linked into the VB app...

Jeff
0
Comment
Question by:jeffs1
7 Comments
 
LVL 1

Expert Comment

by:sgovinda
ID: 6341395
It is not possible!
0
 

Author Comment

by:jeffs1
ID: 6341519
Why? I am not a VB programmer... but does VB not produce a compiled, machine code object file?  Does it not link these with the standard link.exe?  Then why can it not link in a Visual C compiled obj file?

Jeff
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 6341909
I can not tell you how to do it
but i think it is possible
here's what i found while playing with vb
when vb compiles a program the C2 compiler runs as a proces
thats probably the same C2 vc uses
vb compiles all its modules to .obj files and deletes them when finished
there is 1 .obj file that comes with vb 'vbaexe6.obj'
so i think its save to assume that file is needed by the linker
when i ran the following 'program' while vb was compiling it prevented vb from deleting the .obj files
Private Sub Command1_Click()
    On Error Resume Next
    Do
       Open "ProjectLink.obj" For Input As #1
       DoEvents
    Loop While Err
    Close
End Sub
Private Sub Command2_Click()
    End
End Sub
however when i tried to link the .obj files and vbaexe6.obj the linker came with an error 'no entry point'
and there i was stuck
maybe you can solve that
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 38

Expert Comment

by:PaulHews
ID: 6342390
Yeah, I saw this in a VBPJ article once.  I think they replaced the linker with a custom linker.  It required some very fancy footwork if I remember correctly.  (Don't remember the article, but maybe it will remind someone else--someone with a mind.)
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 100 total points
ID: 6342558
0
 
LVL 1

Expert Comment

by:Un1
ID: 6434998
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6435013
jeffs1,
Any updates?  You also have several other open questions that need tending to...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ms access #TYPE! error on report when no data 4 63
Determine Range to Select 5 42
Sending a email via excel using vba 6 71
MS Date Picker 64 bit 32 bit issue 12 49
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now