1

Topic: At function invocation from DLL to parameters ByRef VB there is a program termination

Good afternoon;
Is indirect DLL, there are some functions, an example
Declare Function _ ".dll" (ByVal variable As String, ByVal variable As Integer.... ByVal variable As Single, ByRef variable As Any, ByRef variable As Any, ByRef variable As Any) As Long
Declared in the unit, I cause in shape x=_ (parameters ByVal.... Variables ByRef)
Print x
What I do not so?

2

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

A what type at a variable transferred ByRef? It is necessary to transfer the address in addition correctly received.

3

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Akina;
Some as Any, some the user

4

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

And DLL generally knows about existence of types and methods of their storage in that form which is accepted in VB? Is able to understand, what exactly on it palmed off? She probably on the nonsense expects standardly-sishnye parameters...

5

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Akina;
I can not tell, but to me transferred a file where it is specified as to declare and how to cause function, also gave a DB in a format.dat and.idx, sense in that that  one of functions should us some models of the equipment with those  which we will be returned remaining those imported + that ByRef, but by a call the program and in a folder  additional files with a format.dat and.idx, and a name arbitrary is completed

6

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

shushan;
More correctly - program operation is under abnormal condition completed.
99 % that it are connected with wrong transferred in DLL types of variables.

7

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

by-pass wrote:

shushan;
More correctly - program operation is under abnormal condition completed.
99 % that it are connected with wrong transferred in DLL types of variables.

Well;
Look if type "as any" in function as me to declare a variable when I cause function
Example
The unit code
Declare Function GetPoints Lib "Select.dll" (ByVal Type As String, ByVal Size As String, ByVal RPM As Integer, ByVal Diffuser As Integer, ByRef CPoints As Any, ByRef SPoints As Any, ByRef BPoints As Any) As Long
The form code
Dim Type As String
Dim Size As String
Dim RPM As Integer
Dim Diffuser As Integer
Dim CPoints, SPoints, BPoints
dim x as long
x=GetPoints ("asd", "4", 15,45, CPoints, SPoints, BPoints)

8

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

You have an OPERATING example of usage of this function - from the developer or the one who  transferred this to you?

9

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Dim CPoints, SPoints, BPoints
It is wrong, most likely there something of type such should be:

Dim CPoints as Long
Dim SPoints as Long
Dim BPoints as Long
CPoints = 0
SPoints = 0
BPoints - 0
x=GetPoints ("asd", "4", 15,45, CPoints, SPoints, BPoints)

10

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Konst_One , moreover as though not VARPTR ().

11

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Here then let addresses to developers DLL

12

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Akina wrote:

you have an OPERATING example of usage of this function - from the developer or the one who  transferred this to you?

No, there is exe a program written on Vb, and it dll to me a distance

13

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Akina wrote:

Konst_One , moreover as though not VARPTR ().

. it is possible in function at the declaration function VARPTR has been used?

14

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

shushan wrote:

there is exe a program written on Vb, and it dll to me distances

Here take a source code of THIS program and in it look, how variables transferred there and as they are actually transferred are defined.

15

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

Akina wrote:

it is passed...
Here take a source code of THIS program and in it look, how variables transferred there and as they are actually transferred are defined.

Do not give

16

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

shushan;
Throw dll and the call code.

17

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

shushan wrote:

do not give

Then demand provision of minimum test application. The WORKING. As it is accepted at all authors of libraries and .
And if do not give - send . The reason lethal - those who gave library, MEANINGLY do not give the information necessary for creation by you of application. Saboteurs, are shorter - but you here at what?

18

Re: At function invocation from DLL to parameters ByRef VB there is a program termination

ATM-TURBO 2 wrote:

shushan;
Throw dll and the call code.

Unfortunately I can not give , signed NDA (((