- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not able to pass an array of UDT from a VB program to a subroutine in a DVF dll
the UDT is this :
TYPE PAR_TS
SEQUENCE
REAL(4) B0EI
REAL*4 B0SF
SEQUENCE
REAL(4) B0EI
REAL*4 B0SF
REAL*4 BSC_RAS
REAL*4 BSC_AGGSOL
REAL*4 TAUSC
REAL*4 BSC_AGGSOL
REAL*4 TAUSC
INTEGER*4 KTIPO
INTEGER*2 IDCLS_EI
INTEGER*2 IDCLS_SF
INTEGER*2 IDCLS_SF
CHARACTER(len=8) DESCRB
CHARACTER(len=32) DESCR
CHARACTER(len=32) DESCR
END TYPE
the problem (I think) are the fixed-length strings
can you help me ? canI find somewhere something about this topic ?
I'm using VB 6.0 (SP3) and Compaq VF 6.1A
thanks
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exchanging strings between VB and CVF can be tricky. It has been discussed many times in the past: search the CVF archives at
http://softwareforums.intel.com/ids/board?board.id=15
Also, take a look at ...DF98SAMPLESMIXLANGVBTYPEARRAYS
Ciao,
Gerry T.
http://softwareforums.intel.com/ids/board?board.id=15
Also, take a look at ...DF98SAMPLESMIXLANGVBTYPEARRAYS
Ciao,
Gerry T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any suggestions if I want to see that example, but have Intel Fortran?
A similar example for IVF would actually be better.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have attached the CVF sample - it should be pretty much the same for IVF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used the .NET conversion program to convert the above mentioned CVF TypeArrays example, but it doesn't work. Further experiments shows that type arrays with array elements simply won't work.
Using SafeArrayAccessData call appear to work in VB6 but not in VB.NET. It make me wonder VB6 and VB.NET may have very different argument passing convesion.
So far, as I tried out different combinations, there are two situations that work:
(1) a single UDT with array elemenents, or
(2) UDT arrays with scalar elements.
It was done by simply passing the an UDT or UDT arrays ByRef on the VB.NET side and receive the arguments without using SafeArrayAccessData.
Have anybody have any success passing type arrays with array elements between VB.NET and IVF Win32 DLL?
TIA
-George
Using SafeArrayAccessData call appear to work in VB6 but not in VB.NET. It make me wonder VB6 and VB.NET may have very different argument passing convesion.
So far, as I tried out different combinations, there are two situations that work:
(1) a single UDT with array elemenents, or
(2) UDT arrays with scalar elements.
It was done by simply passing the an UDT or UDT arrays ByRef on the VB.NET side and receive the arguments without using SafeArrayAccessData.
Have anybody have any success passing type arrays with array elements between VB.NET and IVF Win32 DLL?
TIA
-George

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page