473,397 Members | 1,949 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,397 software developers and data experts.

Converting dotnet dll to com object - one problem arises - any workarounds?

I've been converting a dotnet dll to a com object so that it can be
called from vb6. If I want to pass a structure to a routine in the
com object, like this:
Call MyRoutine(byref MyStruct as MyStructType)
it works when the structure is a simple structure full of integers,
dates, etc.
But if the structure contains one or more strings, I get an error
message when compiling the caller. Apparently you cannot pass a
structure that has strings.
One solution would be to take all the strings from the structure (mine
has 14 of them) and use them as separate arguments to the routine.
This is inconvenient for the user. Another solution is to have an
intermediate vb6 dll that has a routine that receives the structure,
and dissects it into the 14 strings, and then passes those to the com
object.
Is there any other possible workaround that I could use?
Thanks,
HA

Jul 10 '07 #1
2 1575
Your error is from the VB 6 compiler, not VS 2005. Have you posted this to a
group regarding VB 6?

"HO*************@YAHOO.COM" wrote:
I've been converting a dotnet dll to a com object so that it can be
called from vb6. If I want to pass a structure to a routine in the
com object, like this:
Call MyRoutine(byref MyStruct as MyStructType)
it works when the structure is a simple structure full of integers,
dates, etc.
But if the structure contains one or more strings, I get an error
message when compiling the caller. Apparently you cannot pass a
structure that has strings.
One solution would be to take all the strings from the structure (mine
has 14 of them) and use them as separate arguments to the routine.
This is inconvenient for the user. Another solution is to have an
intermediate vb6 dll that has a routine that receives the structure,
and dissects it into the 14 strings, and then passes those to the com
object.
Is there any other possible workaround that I could use?
Thanks,
HA

Jul 12 '07 #2
sa
On Jul 12, 7:18 am, ModelBuilder
<ModelBuil...@discussions.microsoft.comwrote:
Your error is from the VB 6 compiler, not VS 2005. Have you posted this to a
group regarding VB 6?

"HONOREDANCES...@YAHOO.COM" wrote:
I've been converting adotnetdll to a com object so that it can be
called from vb6. If I want to pass a structure to a routine in the
com object, like this:
Call MyRoutine(byref MyStruct as MyStructType)
it works when the structure is a simple structure full of integers,
dates, etc.
But if the structure contains one or more strings, I get an error
message when compiling the caller. Apparently you cannot pass a
structure that has strings.
One solution would be to take all the strings from the structure (mine
has 14 of them) and use them as separate arguments to the routine.
This is inconvenient for the user. Another solution is to have an
intermediate vb6 dll that has a routine that receives the structure,
and dissects it into the 14 strings, and then passes those to the com
object.
Is there any other possible workaround that I could use?
Thanks,
HA
testing <a href="http://www.openwinforms.com/">openwinforms</a>

http://www.openwinforms.com/

Jul 16 '07 #3

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

Similar topics

3
by: Jonny Au | last post by:
Hi everyone, I have a problem about email message format converting. I want to write a program in VB.NET to convert the EML format email message to MSG format, does anyone knows how to do it?...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
4
by: Clark Stevens | last post by:
I have a program that I'm converting from VB6 to VB.NET. It reads in a text file containing barcode numbers and their corresponding descriptions. Then the user enters the barcode number and the...
1
by: Glenn M | last post by:
I have a date stored as a string in the format mm/dd/yyyy. What is the easiest way to get this date converted to a datetime object so i can include it in the datediff function. also what is the...
3
by: Mary | last post by:
Hi, Does anyone know of any software out there that would convert an application written in VBScript to either VB.NET or C#/C++ quite quickly for me, or will I have to re-write the application...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
7
by: Coleen | last post by:
Does anyone have any good detailed information on the conversion process? We are in the process of converting 2 projects from 2003 to 2005 and have some conversion errors that I can not find...
1
by: =?Utf-8?B?bWFsdGFnaXJs?= | last post by:
I have a spreadsheet containing several dates (ex:1/4.2001). I am trying to convert the month (1) in text (January). I manged to do so using the Format Cells command after applying the Month...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.