473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Creating an object visible to Visual Basic

rgb
I've got Visual Studio 6.0 and I'm working on a Visual Basic applicaiton.
There a couple parts that really require C.
I've done C programming on a mainframe but nothing on a PC.
So I'm trying to find an example of how to write a function that
has object visibility in VB.

The functionality I want to implement is quite straightforward.
VB will pass me 2 huge byte arrays and about 10 numerical values
that 'tell me how to proceed'. I'll then make substantial changes
to the the arrays and return. Only the array contents need change
not the size.

It would be nice if I could write the C stuff such that VB could do
dim foo as new foo_obj
foo.valA = bla
foo.valN = Xbla
foo.process(array1,array2)
And I could provided a function that VB could call to update a progress bar.
But I'll settle for much less than all that.

Anyone know where an explaination/example can be found?
I've done a little C++ too so if it's easier in C++ no problem.
Nov 14 '05 #1
3 1815

"rgb" <rb******@i1.net> wrote
I've got Visual Studio 6.0 and I'm working on a Visual Basic
applicaiton.
There a couple parts that really require C.
I've done C programming on a mainframe but nothing on a PC.
So I'm trying to find an example of how to write a function that
has object visibility in VB.

The functionality I want to implement is quite straightforward.
VB will pass me 2 huge byte arrays and about 10 numerical values
that 'tell me how to proceed'. I'll then make substantial changes
to the the arrays and return. Only the array contents need change
not the size.

It is better to ask these sorts of questions in the caller's rather than the
callee's language.

A C function will compile to an object or library file that contains the C
name of the function, or "label" as its entry point. Parameters are set up
in a standard way.

If VB allows you to call assembler functions, the procedure for calling C
functions is likely to be extremely similar.
Nov 14 '05 #2
Hi,
I have done this type of programming before.There are two
approaches:Make a component mainly an ATL COM type of component which
will remove ur language dependency or create a DLL in C and VB allows
u to add dlls in ur code and create objects out of it and u can access
all the dlls functionalities via the created object.Hope this helps.
Regards,
s.subbarayan

rb******@i1.net (rgb) wrote in message news:<3d**************************@posting.google. com>...
I've got Visual Studio 6.0 and I'm working on a Visual Basic applicaiton.
There a couple parts that really require C.
I've done C programming on a mainframe but nothing on a PC.
So I'm trying to find an example of how to write a function that
has object visibility in VB.

The functionality I want to implement is quite straightforward.
VB will pass me 2 huge byte arrays and about 10 numerical values
that 'tell me how to proceed'. I'll then make substantial changes
to the the arrays and return. Only the array contents need change
not the size.

It would be nice if I could write the C stuff such that VB could do
dim foo as new foo_obj
foo.valA = bla
foo.valN = Xbla
foo.process(array1,array2)
And I could provided a function that VB could call to update a progress bar.
But I'll settle for much less than all that.

Anyone know where an explaination/example can be found?
I've done a little C++ too so if it's easier in C++ no problem.

Nov 14 '05 #3


rgb wrote:
I've got Visual Studio 6.0 and I'm working on a Visual Basic applicaiton.
There a couple parts that really require C.
I've done C programming on a mainframe but nothing on a PC.
So I'm trying to find an example of how to write a function that
has object visibility in VB.

The functionality I want to implement is quite straightforward.
VB will pass me 2 huge byte arrays and about 10 numerical values
that 'tell me how to proceed'. I'll then make substantial changes
to the the arrays and return. Only the array contents need change
not the size.

It would be nice if I could write the C stuff such that VB could do
dim foo as new foo_obj
foo.valA = bla
foo.valN = Xbla
foo.process(array1,array2)
And I could provided a function that VB could call to update a progress bar.
But I'll settle for much less than all that.

Anyone know where an explaination/example can be found?
I've done a little C++ too so if it's easier in C++ no problem.


You will either need to make a DLL or an activeX control.
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: smeagol | last post by:
Hi, is possible to create an OCX with .NET? I need to use a control (user control) in Visual Fox Pro, but the old fox doesn't accept usercontrols. Any help are welcome
12
by: enak | last post by:
I have found some code that shows how to convert an html form to Word. The message said to simply put the following in the Page_load: Response.ContentType = "application/ms-word"...
2
by: DaWoE | last post by:
Hi all, I'm fairly new to ASP.NET. What i want to do is creat a online registration form. On the first step is getting the users details and the number of people he wants to register. Based on...
9
by: Gordon | last post by:
Hello again, Sorry to repost this request, but I'm under a bit of pressure to find a quick solution. All I basically want is an automatically updating link (OLE, not DDE) between a control in...
1
by: Geraldine Hobley | last post by:
Hello I wish to create an Access Object of an already existing Access .mdb database. Below is how this is done in visual basic 6. Please tell me how to do this in visual basic.net. Dim objAccess...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into word and make word do its thing as a com object. ...
1
by: veronique.brenda | last post by:
Hi, I have a macro on Ms Access 2000 with an action: SetValue; Item: !. and Expression:Yes. I have an OpenForm action just before this action, so definitely the form is opened when the...
2
by: terry guthrie | last post by:
I need some help with visual basic code, I need to create a timer that will be visible while playing a game, i know there is a timer in the tools that you pull over to the project and is hidden, and...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.