Click here to Skip to main content
15,900,258 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalall about exceptions Pin
fume9-Sep-03 22:09
fume9-Sep-03 22:09 
GeneralRe: all about exceptions Pin
SimonS9-Sep-03 22:11
SimonS9-Sep-03 22:11 
GeneralRe: all about exceptions Pin
fume10-Sep-03 14:08
fume10-Sep-03 14:08 
GeneralRe: all about exceptions Pin
fume10-Sep-03 14:17
fume10-Sep-03 14:17 
Generalerror bad dll calling convention Pin
Member 5728499-Sep-03 12:15
Member 5728499-Sep-03 12:15 
GeneralRe: error bad dll calling convention Pin
Hesham Amin9-Sep-03 21:43
Hesham Amin9-Sep-03 21:43 
GeneralRe: error bad dll calling convention Pin
Member 57284910-Sep-03 4:22
Member 57284910-Sep-03 4:22 
GeneralRe: error bad dll calling convention Pin
Member 57284910-Sep-03 7:22
Member 57284910-Sep-03 7:22 
OK. I've gotten into the vc dll. I added a struct command and made it a pointer.

vc dll
<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />


vb declare
<br />
Public Declare Function test Lib "PSAEngine.dll" Alias "_test@8" _<br />
    (ByVal j As Integer, ByRef collateral As collateralvar) As Double<br />


Now my problem is changing the values inside the dll's collateralvar struct and having vb see them. I'm passing the structure by reference so it should work but its not. Here is what I am doing inside the dll function:

<br />
__declspec( dllexport ) double test(int j, struct collateralvar *collateral)<br />
{<br />
	collateral->asset.cutoff_prin_bal[j]=14;<br />
<br />
	return(1);<br />
}<br />


from VB I'm calling the dll this way:

<br />
    dim x as double<br />
    collateral.asset.cutoff_prin_bal(0) = 423149.74<br />
    x = test(0, collateral)<br />


I still get 423149.74 instead of 14.0
GeneralNewbie to VB need some advice please Pin
Flack9-Sep-03 7:04
Flack9-Sep-03 7:04 
GeneralRe: Newbie to VB need some advice please Pin
Ray Cassick9-Sep-03 7:45
Ray Cassick9-Sep-03 7:45 
GeneralRe: Newbie to VB need some advice please Pin
NetPointerIN11-Sep-03 9:51
NetPointerIN11-Sep-03 9:51 
GeneralRe: Newbie to VB need some advice please Pin
Ray Cassick11-Sep-03 9:56
Ray Cassick11-Sep-03 9:56 
GeneralDeploy .Net Application using Access Database Pin
zengfu9-Sep-03 4:54
zengfu9-Sep-03 4:54 
GeneralRe: Deploy .Net Application using Access Database Pin
SimonS9-Sep-03 22:09
SimonS9-Sep-03 22:09 
GeneralAccessing a VC++ DLL in VB Pin
Member 5728498-Sep-03 12:18
Member 5728498-Sep-03 12:18 
GeneralRe: Accessing a VC++ DLL in VB Pin
Steve S9-Sep-03 6:22
Steve S9-Sep-03 6:22 
GeneralRe: Accessing a VC++ DLL in VB Pin
Member 5728499-Sep-03 7:02
Member 5728499-Sep-03 7:02 
GeneralRe: Accessing a VC++ DLL in VB Pin
Dave Kreskowiak10-Sep-03 3:31
mveDave Kreskowiak10-Sep-03 3:31 
GeneralRe: Accessing a VC++ DLL in VB Pin
Member 57284910-Sep-03 4:00
Member 57284910-Sep-03 4:00 
GeneralRe: Accessing a VC++ DLL in VB Pin
Dave Kreskowiak11-Sep-03 4:22
mveDave Kreskowiak11-Sep-03 4:22 
GeneralVB6 Connecting to Lotus Notes and Novell Groupwise Pin
matthew l7-Sep-03 23:52
matthew l7-Sep-03 23:52 
GeneralForm as Startup Object Pin
SuperGeek7-Sep-03 13:34
SuperGeek7-Sep-03 13:34 
GeneralRe: Form as Startup Object Pin
Nick Seng7-Sep-03 15:49
Nick Seng7-Sep-03 15:49 
Generalconvert integer to points Pin
pnpfriend7-Sep-03 5:12
pnpfriend7-Sep-03 5:12 
GeneralPrint Preview an Imgae Pin
su_see7-Sep-03 0:10
su_see7-Sep-03 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.