Sie sind auf Seite 1von 15

Home Scripts Tutorials Tracker Forums

Submit
HOME TRACKER
Calling Matlab In VB
I have a VB program that calls MATLAB and solves a Linear Programming problem in
matlab. Then it uses the results from matlab in subsequent steps of the VB program.
The problem is that I have to run the program about 30 times to get an average time
it took the program to get the required solution. If I run the program once, I do get
the required solution but if I use a FOR LOOP to run it about 30 times, I get error
424"OBJECT REQUIRED".
Could this problem be caused by starting and killing matlab about 30 times or is it
caused by the ObjStrip??
The code and declarations are very long, so I have just given a brief illustration of
the code: Configuration is a user defined type and the sub procedure KenyonRemila
is in an Active X DLL....
Code:
Const intRepeatNum as integer = 30
Dim intTimeCount as integer
Dim timStart as long, timEnd as long,lngTotalTimeTaken as single
Dim lngTimeTaken as single
Dim intNumNarrowRec as integer, intNumWideRec as integer
Dim splevel() as Configuration, spcol() as Configuration, spwidt() as COnfiguration
For intTimeCount = 1 To intRepeatNum
Dim objStrip As PackageActX.clsStrip
Set objStrip = New PackageActX.clsStrip
intMaxLevel = 0
intNumNarrowRec = 0
intNumWideRec = 0
sngStripHeight = 0
intGroupNum = 0
'We want the program to run about 30 times and then gives the average time taken
timStart = GetTickCount
Call objStrip.KenyonRemila(lngProjectId, Val(txtStripWidth), arrWideRectangle(), _
sngEpsilon, intGroupNum, sngStripHeight, _
splevel(), spcol(), spwidt(), arrNewGroup(), _
intMaxLevel, arrpiece(), arrNarrowRec(), _
spPackingWidth(), spPackingWidthNarrow(), arrRectanglesPerColumn(), _
arrRectanglesPerSublevel(), bolPackedColumn(), bolPackedSublevel(), _
intNumNarrowRec, intNumWideRec, sngAlpha)
timEnd = GetTickCount
lngTimetaken = lngTimetaken + (timEnd - timStart)
Visual Basic 6.0
VB Code
VB Array
Fuzzy and Neural
Approaches in
Engineering
Hardcover
(2)
$196.00$147.00
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
1 of 15 24-Apr-14 11:28 AM
Set objStrip = Nothing
Next
lngTotalTimeTaken = lngTimetaken / intRepeatNum
lblTimeTaken = lngTotalTimeTaken
I am particularly worried about the statements
Code:
Dim objStrip As PackageActX.clsStrip
Set objStrip = New PackageActX.clsStrip
Set objStrip = Nothing
and how to place them in the FOR LOOP.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Calling MATLAB In VB
Matlab To VB
VB To Matlab
VB + MatLab
Matlab + VB !!
VB & Matlab, Please..
Matlab And VB 6
VB & MATLAB
VB-Matlab
MatLab And VB
Intergrate Matlab With Vb?
VB Drives Matlab
DoEvents In MATLAB
Matlab Functions In VB
VB6 And MatLab Interacting
Can I Link MATLAB With VB?
Any VB AND MATLAB Gurus Here?
ADVICE ON Matricies&MATLAB 6.1
Matlab Automation Error
Shell To A Matlab Stand-alone App. From VB??
Feed Data Into Matlab Using Vb
Anybody Have A (VB)module To Link VB And Matlab?
Convert C++ And Matlab Code Into VB6
Convert Matlab To Vbase
.net Dll Created Out Of Matlab M File
[b]Detect MATLAB Installation In VB
Exchange Data Between Vb6 En Matlab
Create MATLAB Mat-file?
Interface Matlab (link Between VB And Another Program)
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
2 of 15 24-Apr-14 11:28 AM
Passing Values From Matlab Dll To VB6 Does Not Work
Incorperating Matlab Into Visual Basic
Excel And Matlab's GARCH Toolbox
Analyzing Pictures (2D FFT With Visual Basic (or Matlab?))
Simulation For 4th Order Runge Kutta Using Matlab
Calling C++ DLL - Invalid Calling Structure
Link Vb 6.0 Code To Matlab Code
Calling An Oracle Package.Procedure Works But Calling A Function In The Package
Does Not ?
Calling A DLL Function...is This A "calling Convention" Problem?
Calling A Sub In The Calling Program
Calling Itself?
Calling C# Dll In VB 6
Help With Calling A C++ Dll
Calling C++ Dll Through VB6
Calling C++ From VB
Calling Dll
Calling Something Else
Calling URL From VB OCX
Calling My Own Dll
Calling A DLL From A DLL
Calling MATLAB In VB
I have a VB program that calls MATLAB and solves a Linear Programming problem in
matlab. Then it uses the results from matlab in subsequent steps of the VB program.
The problem is that I have to run the program about 30 times to get an average time it
took the program to get the required solution. If I run the program once, I do get the
required solution but if I use a FOR LOOP to run it about 30 times, I get error 424"OBJECT
REQUIRED".
Could this problem be caused by starting and killing matlab about 30 times or is it caused
by the ObjStrip??
The code and declarations are very long, so I have just given a brief illustration of the code:
Configuration is a user defined type and the sub procedure KenyonRemila is in an Active X
DLL....
Code:
Const intRepeatNum as integer = 30
Dim intTimeCount as integer
Dim timStart as long, timEnd as long,lngTotalTimeTaken as single
Dim lngTimeTaken as single
Dim intNumNarrowRec as integer, intNumWideRec as integer
Dim splevel() as Configuration, spcol() as Configuration, spwidt() as COnfiguration
For intTimeCount = 1 To intRepeatNum
Dim objStrip As PackageActX.clsStrip
Set objStrip = New PackageActX.clsStrip
intMaxLevel = 0
intNumNarrowRec = 0
intNumWideRec = 0
sngStripHeight = 0
intGroupNum = 0
'We want the program to run about 30 times and then gives the average time taken
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
3 of 15 24-Apr-14 11:28 AM
timStart = GetTickCount
Call objStrip.KenyonRemila(lngProjectId, Val(txtStripWidth), arrWideRectangle(), _
sngEpsilon, intGroupNum, sngStripHeight, _
splevel(), spcol(), spwidt(), arrNewGroup(), _
intMaxLevel, arrpiece(), arrNarrowRec(), _
spPackingWidth(), spPackingWidthNarrow(), arrRectanglesPerColumn(), _
arrRectanglesPerSublevel(), bolPackedColumn(), bolPackedSublevel(), _
intNumNarrowRec, intNumWideRec, sngAlpha)
timEnd = GetTickCount
lngTimetaken = lngTimetaken + (timEnd - timStart)
Set objStrip = Nothing
Next
lngTotalTimeTaken = lngTimetaken / intRepeatNum
lblTimeTaken = lngTotalTimeTaken
I am particularly worried about the statements
Code:
Dim objStrip As PackageActX.clsStrip
Set objStrip = New PackageActX.clsStrip
Set objStrip = Nothing
and how to place them in the FOR LOOP.
Matlab To VB
Hello All,
I have a problem using Matlab and VB.
I have an application in Matlab that do some calculations and would like to send the result
in a text box in a Visual Basic form.
I have tried to create an ActiveX client from Matlab but do not know the ProgID of VB.
Maybe it is better to use a ddelink between MAtlab and VB but do not know what arguments
to put in ddeinit.
Any ideas?
Thanks for your help.
VB To Matlab
I was wondering if anyone knows how to convert data from vb to a level 5 .mat (matlab)
file
VB + MatLab
dear all,
i ve got a problem in linking vb and matlab ...
well i ve done an interface in vb for a matlab program ...
and now i wish to pass an array of collected data from the interface to my matlab
program...
any ideas of how can i do this..
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
4 of 15 24-Apr-14 11:28 AM
i greatlly appreciate any kind reply...
Matlab + VB !!
Hey ...
Can we run a matlab function or a matlab .m file using VB.
i.e. Can we start matlab -using some command line- from VB and at the same time load
and execute a .m file. Let's say i have a file named: test.m and i want to execute it under
matlab but from VB!!
10x anyway!!!
VB & Matlab, Please..
I really2 need to know, is there a way to call a *.m (Matlab's Mfile) from VB form?
Thanks alot
Matlab And VB 6
Hello,
I am using Matlab 6.1 to write a few functions and algorithms. I wish to
interface these functions in .m files in Visual Basic 6.0 in my application.
I'd be very grateful if some of you gurus out there could help me out!
Regards,
Sybtain
VB & MATLAB
Hi all
Matlab is an engineering mathematical software
it can be used via VB , it works very well but there is
a probelm how can I pass my parameters to that software
or any other special software without running it in my
program , I mean I want when I run some part of program
that software runs over my program & it's windows
has been shown. it is my question:
how can I run a program in vb but doesn't show it's windows?
it caused some problem to user (they should learn how to
use my program & the otherone also...)
Tx for any comment or hint
Ame
VB-Matlab
Hello Friends !
I need to know how to run a Matlab file through a VB project.
The task is to get data from a SQL server, process it (& store it in a txt file) using Matlab,
and then using VB read the processed data from the txt file.
everytime a specific event happens in the VB project (say commandbutton click), the
matlab file is to be run and the data processed.
Can this be done?
please help.
Thank you.
A K
MatLab And VB
Hi, I have the following code that tries to solve a binary integer programming problem.
Everything works perfectly. The problem is that I need to get OUTPUT in Vb and I don't
know which command to use. OUTPUT gives the number of iterations, the number of nodes,
the time spent to branch and bound etc. Does anyone know how to do this??
Code:
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
5 of 15 24-Apr-14 11:28 AM
Call MatLab.PutFullMatrix("X", "base", y, Mimag)
Result = MatLab.Execute("[X,FVAL,EXITFLAG,OUTPUT] = bintprog(f1,A,b1,Aeq,beq1)")
Call MatLab.getfullmatrix("X", "base", y, Mimag)
Intergrate Matlab With Vb?
hello i want to know how to intergrate matlab with vb ?
can give me some website for me to study?
hope you can help me... :-)
VB Drives Matlab
Can Visual Basic drives matlab software ??
What i mean is that let's said i have the matlab codes in a notepad and i will run it once i
click a button and the codes in the notepad will be run in matlab operation.
so can it be done ??
DoEvents In MATLAB
Has anyone used MATLAB? I'm using MATLAB 6.1 (going to be upgraded to 6.5 soon).
Can anyone point me to a function that is equivalent to the DoEvents function in VB? All it
is is a Play and a Stop button. When the user presses play, a loop starts that keeps a wave
playing until the user presses Stop. But the user can't press the Stop button while the loop
is running. The original thread can be found here. Any help is appreciated. Thanks.
BTW - I'm not in any way integrating VB into MATLAB or vice-versa.
Matlab Functions In VB
how to call matlab functions in VB. is there anyway to do that?
Please let me know
VB6 And MatLab Interacting
I need to start a Matlab script from VB passing it arguments.
The Matlab process will create a data output that I want to get back into the VB application.
VB doesn't have the horsepower I need to crunch the data that I must work with. Matlab
can do it in a snap, but I have to be able to programmatically get the results back into the
VB application.
I have it implemented using a shared file, but this is so risky and slow that I was hoping
someone would have a better solution.
Thanks
Ed
Can I Link MATLAB With VB?
Can i link MATLAB with vb?if possible how can i link.those who know this please let me
know
thanks
Any VB AND MATLAB Gurus Here?
Is it possible (and if yes how?) to pass an array of data from MATLAB (R12) to a
VB ActiveX control as method argument.
I have tried the following but was not able to access the data.
public Sub SetData( byval vData as Variant )
Dim lData as Long
MsgBox LBound(vData) & " " & UBound(vData) ' shows 0 0
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
6 of 15 24-Apr-14 11:28 AM
lData = vData(0) ' fails
End Sub
call method in ML (hh is handle to ActiveX object)
invoke(hh,'GetData',[1 2 3])
Any help appreciated.
ADVICE ON Matricies&MATLAB 6.1
Does VBA solve matrix equations (like with Gauss elimination) or would I have to write
something for it?
Also, if u happen to be good in Matlab 6.1, I have a program on Matlab 6.1 that uses some
basic matrix operations, but I'm working on VBA. Should I just rewrite the whole darn thing
in VBA (it long but not that long) or try to link VBA with MATLAB.
Matlab Automation Error
I'm currently doing a project using matlab to create a DLL file. Then, we will called the DLL
file from the visual basic. But the follow problem encountered when i create the object
Quote:
Run-time error '-529697949(e06d7363)'
Automation Error
This problem will occur occasionally. Which means, it will not occur always. When this error
occur, I stop the application and restart the same procudure(i mean the same function call).
My visual basic 6 will crash with following message.
Quote:
R6023
-Pure virtual function call
After i restart my visual basic. Everything look fine..... Anyone can help me. Below is the
code where the error occur
Quote:
Dim WithEvents preposs As pre.prepossing
Public Function prepossing(Pic_Path As String, save_path As String, mform As Form)
'initialise the distance DLL
Set preposs = New pre.prepossing <-- error occur here
preposs.MWFlags.DataConversionFlags.CoerceNumericToType = mwTypeDouble
Call preposs.Run(1, result, Pic_Path, rotate_path, resize_path, save_path)
Set preposs = Nothing
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
7 of 15 24-Apr-14 11:28 AM
Exit Function
error:
prepossing = 0
MsgBox ("Error accessing the prepossing module, please make sure the file is in correct
directory")
End Function
THanks in advance...
Shell To A Matlab Stand-alone App. From VB??
Does anyone ever shell to a Matlab stand-alone exe file from VB?
Thank you.
Feed Data Into Matlab Using Vb
I want to use some algorithm in matlab by using vb to input and display results
Is this possible using an activeX or some DLL or ...
Anything would help
Anybody Have A (VB)module To Link VB And Matlab?
I need to work with VB and Matlab, but i dont know how to combine them.
What i want to do is, to make a VB form to receive inputs from user, and then the inputs
are sent to be mathematically processed by Matlab algorithm (such as linear programming).
Do u guys have a such module?
THANK YOU SO MUCH,
Mike
Convert C++ And Matlab Code Into VB6
Hi everyone!! I have a problem here on how to convert C++ module into vb format.It's
actually a SGP4 code,that is a satellite propagator program. I use it in my satellite
simulation program for my final year project. So, please help me..
Convert Matlab To Vbase
I was wondering if any one knew about a way to convert a matlab formula in vbase
WITHOUT changing the codes into subs etc... I would like to be able to READ the matlab
Formula and run it THROUGH vbase....
If any one know anything about this, hjelp would be appreciated.....
.net Dll Created Out Of Matlab M File
Hello Guys,
I am new to Matlab, I have created a dll out of some matlab m files (using .net compiler).
The command lines of the m files goes like this.
sys.S=[1 4 0.0;
1 5 0.0;
2 4 0.0;
3 3 0.0;
9 3 0.0];
sys.P=[1 3 1.0];
sys=linelstat(sys);
Now I have creted an instance of a class in the dll and want to give the above inputs to the
method. The method askes three input parameters like femsys.linelstate(int, ref
MWArray[], MWArray[]). I created MWArray[] and give as parameter, but it throws
exception that "object reference not set an instance of the object.....".
Can anybody tell me how to give the sys.p, sys.S in to the dll (created by .net compiler).
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
8 of 15 24-Apr-14 11:28 AM
Thanks in advance.
Maria
[b]Detect MATLAB Installation In VB
I have a VB program that calls Matlab to solve binary integer program. The program can
only work provided MatLab is installed on a PC. Does anyone know which code to use in VB
to detect whether MatLab has been installed or not??
Exchange Data Between Vb6 En Matlab
hello
I have a question:I have to write a program in vb6 that can execute a matlab m-file(a have
to sent 2 integer with it) and returns the data( the data is 1 integer and a matrix
(2*44100)). Can somebody tell me what the best solution is for this problem(dde , com ,
just a txt file to exchange the data or something else)?
ps: i apolegize for my englisch
greets
casperslok
ps: i apolegize for my englisch
Create MATLAB Mat-file?
Does anyone know how to create a MATLAB mat-file in VB?
Interface Matlab (link Between VB And Another Program)
I have an array (2D matrix) in VB and I would like to "copy" it into Matlab and analize this
this matrix with a function from there. The result should come back into my program in VB
(a new array). How is this possible to realize? Is there a possibility making it with ddl files?
How?
Please post your ideas
Thank you for your help
tomaa
Passing Values From Matlab Dll To VB6 Does Not Work
Hello everybody,
I'm using a matlab ActiveX DLL in VB6 project. This DLL's function should accept several
arrays as input parameters and several variables, with type double, as output parameters.
My code looks like this:
Dim A As Double
Dim B As Double
Dim F As Double
Dim X() As Double
Dim Y() As Double
Dim objCBP As cbp.cbpclass
Set objCBP = New cbp.cbpclass
objCBP.MWFlags.ArrayFormatFlags.InputArrayFormat = mwArrayFormatAsIs
objCBP.MWFlags.ArrayFormatFlags.OutputArrayFormat = mwArrayFormatAsIs
objCBP.MWFlags.DataConversionFlags.CoerceNumericToType = mwTypeDouble
Call objCBP.Func(2, A, B, X(), Y(), F)
Parameters A and B are output parameters, F is an input parameter. DLL function has a
control print, which prints the expected output values. The control print shows that, within
DLL, output parameters' values are correctly set, but when passing these values back to
VB, the expected values are not set. On the other hand, passing input arrays and
parameter F from VB to DLL works fine. Matlab does not accept parameters passed by
reference, so all the parameters must be passed by value.
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
9 of 15 24-Apr-14 11:28 AM
I already have an alternate solution of this problem, but I would like to avoid it, if possible:
DLL can have global variables, that are seen from VB code, and in that case, output
parameters in the function are not necessary (actually, Matlab must have at least one
output parameter), DLL sets the values of these global variables, and VB accesses them.
The code looks like this:
Set objCBP = New cbp.cbpclass
objCBP.MWFlags.ArrayFormatFlags.InputArrayFormat = mwArrayFormatAsIs
objCBP.MWFlags.ArrayFormatFlags.OutputArrayFormat = mwArrayFormatAsIs
objCBP.MWFlags.DataConversionFlags.CoerceNumericToType = mwTypeDouble
Call objCBP.Func(1, A, X(), Y(), F)
A = objCBP.A
B = objCBP.B
In this case, values A and B are passed to VB correctly, although I would really like to avoid
this solution and to receive the values through an the output parameters.
Does anybody have an idea how could I solve this problem?
Thanks in advance,
Ana
Incorperating Matlab Into Visual Basic
I have a program called Matlab and i want to know if i include some matlab references will i
be able to actully make my own matlab compiler. Visit www.mathworks.com to goto it is.
Also if you can, can you do this with any progrm if you have the references...take vis data
for example. It was made in vb and i make microsoft data bases so you must be able to do
it with other programs?
Thx
Excel And Matlab's GARCH Toolbox
When I run the code in the attached file in the Matab command window it executes without
any problems. However, when I try to get the output to Excel, the functions return 0 to
indicate that they executed correctly but do not return the GARCH estimations.
Thanks in advance.

Analyzing Pictures (2D FFT With Visual Basic (or Matlab?))
I have a bmp picture captured from Webcam and I want to analyze it with Fourier
Transforms. We have the points in array in RGB- or Grayscale-Colors. I am searching for a
FFT or better 2D FFT syntax to get the fourier coeffs. in a new 2D image, and to analyze it.
If you have any other ideas to analize (recognizing shapes or movement) a bmp pictures, I
would be pleased if You let me know.
I have been thinking to do this with Matlab, but I would prefer to make it in VB
Thank you for your help.
Simulation For 4th Order Runge Kutta Using Matlab
Hi,
I am working on a simulation using matlab. I have the following mathematical model, which
I have uploaded in the winzip file. However, I am new to matlab and do not really know the
language. anyone knows how to write a short program for this using matlab? please help
me. Thanks.
regards,
Francesco
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
10 of 15 24-Apr-14 11:28 AM
Calling C++ DLL - Invalid Calling Structure
First i got a could not find entry point in DLL error. i fixed that by specifying ordinal
numbers in the VB app. now when i run the program i get an invalid calling structure error
and then VB Studio crashes. I think the crash is do to the threading and debugging at the
same time. i have heard about problems with that. how do i fix the invalid calling structure
error.
HEADER ------------------
#ifdef DLL_EXPORTS
#undef EXPORTMODE
#define EXPORTMODE __declspec(dllexport)
#else
#undef EXPORTMODE
#define EXPORTMODE __declspec(dllimport)
#endif
EXPORTMODE bool StartThread(int nTime, int nInterval);
EXPORTMODE void StopThread();
SOURCE---------------------------
#include "stdafx.h"
#include "header.h"
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
EXPORTMODE bool StartThread(int nTime, int nInterval)
{
return true;
}
EXPORTMODE void StopThread()
{
}
Link Vb 6.0 Code To Matlab Code
Hello,
Im doing my end of year project and part of my application is coded using vb 6.0 an other
using matlab. I really need help for linking the two. Plz could anyone help me....
Thanking u all
Nazia
Calling An Oracle Package.Procedure Works But Calling A Function In The
Package Does Not ?
Hi,
I am trying to call a function in a package in Oracle, from VB. I am using the traditional
ADODB with connection, command and parameter objects. The function has 6 input
parameters and it returns a string value.
We have no problems reaching the similar Procedure under a package, but when it comes
to accessing the function, it gives errors. I got "no descriptor found", after some changes
"object stored Procedure does not exist" .
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
11 of 15 24-Apr-14 11:28 AM
Any suggestions on how differently to access a function within a package as opposed to a
procedure ?
Thanks,
Arch
Calling A DLL Function...is This A "calling Convention" Problem?
Hi All, I'm not sure if this has been covered in another thread. I'm trying to call a function
in a DLL that was written in C++ and its saying it can't find the entry point, I've got the
case and spelling correct.
Heres the C++ example code of how to call it:
LONG DLLFUNC RotorRadioConfigure ( HWND, HANDLE );
and heres my VB code:
public Declare Function RotorRadioConfigure Lib "rr.dll" HWND, HANDLE) as Long
I've also tried using ordinal calls:
public Declare Function RotorRadioConfigure Lib "rr.dll" Alias "#1" (HWND, HANDLE) as
Long
But, I don't know which ordinal number to use, I've tried #1 to #8, then VB crashes, there
are about 15 functions in the DLL.
On each ordinal call, it just says invalid calling convention.
Any help?
Scott.
---
Freeware VB programs at http://net23uk.freeservers.com
Calling A Sub In The Calling Program
Can a sub form call a sub/function in the calling program?
I want to refresh some details in the calling program BEFORE the called program exits.
Thanks
Calling Itself?
I read somewhere about a function/subrountine calling itself. i dunno how this works or if i
mis-read it but can anyone explain how it works and what u would use it for ?
Calling C# Dll In VB 6
PLease Need help, I need to call a dll made in c#.. Hope you can give me a way to do this..
I tried a code in VB, I registered the dll of c# thenrefence the dll.
In my code, I put:
Dim testdll as nameobject
set testdll = new nameobject
then I called and set values to property of the nameobject. But when I run the project, It
gives me an error of Missing namespace..
Help With Calling A C++ Dll
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
12 of 15 24-Apr-14 11:28 AM
I have a project where I have a dll written for C++ with the cdecl calling convention. I have
been trying to get a grip on how to call this dll for a couple of days and I am too new to VB
and know very little of C++ to understand where to begin. I am trying to do some simple
communications to a piece of hardware. The issue I have is that having signed a non
disclosure agreement for the sdk for the equipment I can't really post their code here. I
really need somebody to help me understand the way the sample c++ program
communicates with the equipment and then how to translate this to VB.
I hope this is the right place to ask.
Cheers
Calling C++ Dll Through VB6
Hi,
I m writting an application in C++ that has a relatively complex class. This app when ran as
executable will dynamically generate an array of objects of this class and populate its
private variables using internal logic.
What I need to do now is convert this C++ app to a dll and use it through a VB6 program. I
gathered the basics on how to do that but I have a question on how it will work:
I will be calling a dll function from VB that will create these objects and return the needed
values to a similar (not the same) VB6 user define type. Is it possible to make the c++ dll
program to retain the objects in memory so that they keep their state until the VB program
is terminated? So that I would call a dll function to initialize the objects and then a different
function to update the objects' variables on each call. Is this possbile or will I have to delete
and recreate the objects everytime? If this doesn't work like this then I guess I'll have to
pass the last state of all objects from the VB app back to the dll or use text files.
Hope my questions make sense...
Thanks
Calling C++ From VB
Hi,
I have a C=+ program (PicoPhone) running and I want to control it from my VB program. I
can push buttons remotely just fine using SendMessage.
What I cannot do is read or write using SendDlgItemMessage, I always get a 0 answer
Here is the Function
Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" _
(ByRef hDlg As Long, ByVal nIDDlgItem As Long, ByRef wMsg As Long, _
ByVal wParam As Long, ByRef lParam As Long) As Long
Here is the call
Dim t(0 To 100) As byte, x As Integer, m As String, item As Integer
item = Val(Text2.Text)
t(100) = 0
Call SendDlgItemMessage(hChild, 1038, Wm_Gettext, 100, t(0))
t(x) always comes back empty
also if I change the call for Wm_Settext nothing gets set
Please Help
Calling Dll
I've got this tiny dll that I coded under Assembly and i want it to call it via VB6 .
Code:
It has 4 arguments as folows :
1:DWORD , 2:DWORD , 3:DWORD , 4:DWORD
Calling Something Else
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
13 of 15 24-Apr-14 11:28 AM
I asked something like this earlier but really didnt get a stright answer.
(2 Questions)
1. Can you do something like this, and if so, what is the correct way?:
Code:
timer1_timer()
on text2_lostfocus do '....
'or'
If text2.text = bob and on text2_lostfocus do '...
What is the correct way of doing it?
And....
2. How do you do something like this:
Code:
If text1.text = "A NUMBER" then '......
I want it to be able to equal any number, and if it equals ANY number, from 1 to most likely
about 5000 (I wont need it any higher than that) then it will do this....
Thanks guys
Adam
Calling URL From VB OCX
I current have a HTML page with a number of fields in a form. When the submit button is
pressed a FORM POST is run and the results are displayed on the called web page.
I have replaced the form with an VB Active X (OCX) control, I wish to call the new web
page, I am currently using the Inet1.Execute command - however although this executes
the called web page it does not display the called page.
How can a call a new web page in the same manner as the HTTP Form POST.
Calling My Own Dll
Hi, i've been away for some time, and i just forgot my username, so i had to register again.
In this time i was working on the c and assembly language, so i have two questions: how
can i call my own dll from a vb app? And if i did make it in c and assembly there's some
incompatibility?
Thanks for helping!
Calling A DLL From A DLL
Hi,
This is my first time on this forum, so forgive me if I ask a question that has already been
answered (maybe someone can send me to the appropriate thread if so)
anyway...
I've developed a DLL that requires public calls to another DLL. Let's call the first DLL
myDll.dll and the second DLL as x.dll.
I don't want to create a new instance of x.dll in myDll. I want to simply call the public
functions inside x.dll that were instantiated by another application that would set both
myDll.dll and x.dll.
How do I tell myDll.dll to call x.dll that is already instantiated rather than trying to create a
new instance of x.dll?
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
14 of 15 24-Apr-14 11:28 AM
Thanks!!!
Privacy Policy | Terms of Use & Service | Contact Us | Copyrights Notice
Copyright 2005-08 www.BigResource.com, All rights reserved
Ads by OnlineBrowserAdvertising Ad Options
Ads by OnlineBrowserAdvertising Ad Options
Visual Basic :: Calling Matlab In VB http://www.bigresource.com/VB-Calling-Matlab-in-VB-5WXYmUt4P5...
15 of 15 24-Apr-14 11:28 AM

Das könnte Ihnen auch gefallen