Click here to Skip to main content
15,888,351 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Synchronizing in VB 6.0 Pin
Thomas Krojer17-Feb-11 4:30
Thomas Krojer17-Feb-11 4:30 
GeneralRe: Synchronizing in VB 6.0 Pin
Dave Kreskowiak17-Feb-11 4:29
mveDave Kreskowiak17-Feb-11 4:29 
GeneralRe: Synchronizing in VB 6.0 Pin
Thomas Krojer17-Feb-11 22:34
Thomas Krojer17-Feb-11 22:34 
GeneralRe: Synchronizing in VB 6.0 Pin
Dave Kreskowiak18-Feb-11 9:47
mveDave Kreskowiak18-Feb-11 9:47 
GeneralRe: Synchronizing in VB 6.0 Pin
Luc Pattyn17-Feb-11 4:25
sitebuilderLuc Pattyn17-Feb-11 4:25 
QuestionChange delivery location off RSS feed in Outlook 2010 Pin
tessers15-Feb-11 10:49
tessers15-Feb-11 10:49 
AnswerRe: Change delivery location off RSS feed in Outlook 2010 Pin
tessers15-Feb-11 23:09
tessers15-Feb-11 23:09 
QuestionVB6 calling dll with a callback for progress Pin
Foulques NERA15-Feb-11 7:40
Foulques NERA15-Feb-11 7:40 
Here is the problem :
- The application is in VB6.
- A dll provide services of computing.
- In the dll function, VB6 application provides a callback used by dll for progress of computing.

- For exemple, here is the prototype of dll function :

Public Declare Function NeuroComputerLearning Lib "NeuroComputer.dll" ( _
ByVal parameters As String, ByVal stepFunction As Long) As Integer

- Here is the VB6 function that dll has to call :

Function stepLearningFunction(ByVal step As Long, ByVal percent As Long) As Long
FrmMAIN.refreshLearning step, percent
stepLearningFunction = 0
End Function

- Here is the prototype in dll :

__declspec(dllexport) EnumError NeuroComputerTest(
LPSTR parameters,
void (*stepFunction) (LPSTR step));

- The call in VB6 is :
report% = NeuroComputerLearning(parameterFileName$, FnPtrToLong(AddressOf stepLearningFunction))

The dll success to call the "stepLearningFunction" that correctly do his job, but crash at the "return" of the call.
The popup message is :
"Run-time Checl Failure #0 - The value of ESP was not properly saved cross a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

How to solve this ?

Best regards.
AnswerRe: VB6 calling dll with a callback for progress Pin
Foulques NERA15-Feb-11 8:03
Foulques NERA15-Feb-11 8:03 
QuestionVisual Basic Code in Excel Macro Pin
Ahmad Rifai Yusuf14-Feb-11 20:50
Ahmad Rifai Yusuf14-Feb-11 20:50 
AnswerRe: Visual Basic Code in Excel Macro Pin
Wayne Gaylard14-Feb-11 21:04
professionalWayne Gaylard14-Feb-11 21:04 
AnswerRe: Visual Basic Code in Excel Macro Pin
Dalek Dave14-Feb-11 23:56
professionalDalek Dave14-Feb-11 23:56 
Questionconvert this code pls. Pin
joly mae14-Feb-11 17:21
joly mae14-Feb-11 17:21 
AnswerRe: convert this code pls. Pin
Dave Kreskowiak14-Feb-11 18:07
mveDave Kreskowiak14-Feb-11 18:07 
AnswerRe: convert this code pls. Pin
Thomas Krojer14-Feb-11 23:30
Thomas Krojer14-Feb-11 23:30 
Questionsmtp Pin
David C# Hobbyist.14-Feb-11 13:38
professionalDavid C# Hobbyist.14-Feb-11 13:38 
AnswerRe: smtp Pin
Dave Kreskowiak14-Feb-11 13:57
mveDave Kreskowiak14-Feb-11 13:57 
GeneralRe: smtp Pin
David C# Hobbyist.14-Feb-11 14:01
professionalDavid C# Hobbyist.14-Feb-11 14:01 
GeneralRe: smtp Pin
Dave Kreskowiak14-Feb-11 18:05
mveDave Kreskowiak14-Feb-11 18:05 
GeneralRe: smtp [modified] Pin
David C# Hobbyist.15-Feb-11 5:15
professionalDavid C# Hobbyist.15-Feb-11 5:15 
QuestionExport/Extract/Copy File on startup Pin
Flor!an13-Feb-11 11:13
Flor!an13-Feb-11 11:13 
AnswerRe: Export/Extract/Copy File on startup Pin
dan!sh 13-Feb-11 21:03
professional dan!sh 13-Feb-11 21:03 
QuestionGetting the Full Name of Logged In User Pin
Dominick Marciano12-Feb-11 15:31
professionalDominick Marciano12-Feb-11 15:31 
AnswerRe: Getting the Full Name of Logged In User Pin
Abhinav S12-Feb-11 23:57
Abhinav S12-Feb-11 23:57 
Questionnew project datasource Pin
David C# Hobbyist.12-Feb-11 6:51
professionalDavid C# Hobbyist.12-Feb-11 6:51 

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.