Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Is It Possible To Call Functions In Dll File Created In VisualBasic ?


    Hi Gurus,

       I am doing Licence Mgt Sys Project. I Created one ActiveX Dll File in Visual Basic with functions like

      1. ValidateLicence(ProductCode) as Boolean
            which returns True if it is valid.

      But their apllications are based on MATLAB.
      Can MATLAB Applications call these functions in ActiveX Dlls
            If so How..?

      Please help me.....

           




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
HOW TO CALL ORACLE PARAMETERISED PROCEDURE FROM VISUALBASIC
HELLO,
HOW TO CALL PARAMETERISED PROCEDURE & PARAMETERISED FUNCTIONS FROM VISUAL BASIC.Please treat this is very urgent.If possible please expliain with example and also send code to me.This is more helful for me.
I'm eagerly waiting for your reply.

Bye
oviya.

Using An SQL String To Call Data From Access Database Into VisualBasic DataGrid???..n
the Situtaion:.. I am using an access database that holds dates as strings. example( 06252004 ). I am trying to use an sql string to search everything that is selected from that database table, for dates specified as a start date and end date, which are specified by the user. The results should be placed on a datagrid.

All my sql attempts have failed.


Can anyone help me peice one together, in an SQL string format, that will work in VB and be accepted by access when vb passes it to it?

Visualbasic-l [visualbasic-l@openitx.com] Deployment Wizard Error Message
To All,

I am trying to package a project and I am getting this error:
"File must contain text."

This may sound simple, and just might be, but I have invested far toomuch time in troubleshooting.

If anyone knows the exact reason for its generation, I would greatlyappreciate it.

Maybe, exact is too strong a criteria. If anyone has a suggestion, Iwould greatly appreciate it.

I have places file names in everything that I am including in thisproject. I have opened all my ActiveX objects and made sure theirproperties were filled out, if any existed. I have done a mass searchfor filename and placed comments in front of any word that might havebeen mistaken as filename and tried to repackage and still this error.



I guess, I could go on with my testing, but I am tired of typing.

Thanks for anyone's help,



<<ole0.bmp>>


James Neal
Senior Programmer Analyst, Integrated Scheduling
CAE, USA Inc.
(813)887-1227
email@removed

VBA And Using Functions Created By User
I have created a function within one VBA enabled program, lets say excel, and would like to call it from another program within VB using the object name. How can I call user created functions from other applications?? So I need to declare it a special way?

Any help appreciated.

JL

Use Functions In Vc Created Dll In Vb Using Add Reference
hi,

I have successfully created a dll in vc++ using ATL COM.
And i am able to add reference to it in VB.
However i am still unable to use the functions inside the dll.
How should i code my dll so that i can use the functions inside?
I do not wish to use "declare function"

Hope someone can help!

thank you!

How To Call Vb Created Dll From Vba?
I am going to create a dll called mycode.dll with vb6. Suppose I want to call sub main inside the dll from excel vba. How would I do that? Thanks.

Any Way To Call From Vb 6.0 Or Vc 6.0 A Dll Created In .net Without Using TLB?
This is because TLB exposes the data structures in the dll which I want to keep secret such as this in made in VB.net class library:


VB Code:
Structure MyStructure Friend Secret as IntegerPublic NotSecret as Integer End Structure


In VB.net only NotSecret is exposed. However if i expose the structure as a type library, Secret is exposed too..

Is there a way to link to the dll using Declare in VB 6.0 or LoadLibrary in VC 6.0? I dun wan to code the dll with a COM interface and hence allowing users of the dll to use regasm to convert the dll to tlb format.

Is It Possible To Call A Dll Created In .net From Vb 6.0?
Hi evryone. I'm not talking about the system .net dll or tbl. I'm refering to a dll i created in vb.net. Am i able to use it in a vb 6.0 application?
Thanks in advance and a happy wkend ahead!

User Created Functions With Optional Parameters
Does anyone know if it is possible to write functions that have optional parameters? Like the Instr has the optional comparison type and starting position parameter.

Read/Call From User Created DLL
Hi all,

I have created a DLL, but I have no clue how to call from it. I've got it registered in the system but I don't know where to go from there... do I just call the function like it was part of the project or what?

In VB5 How Do You Call A Report Created In Acces 97
I have created a report in Access 97 based on informqation in a database but wish to call it from a command button in VB5.

How can this be done?

Many thanks

Call Procedure From Control Created At Runtime
Hello,

I have the following problem:

I generate at runtime as many textboxes as I have files in a directory. Each textbox contains the name of that file.

Now what I want:
When I change the name in the textbox, a procedure must do something (eg. search if the name already exists).
But how must I do this? The textboxes do not exist in design time (except the textbox with index 0 to indicate it is a control array) so I cannot put code in a sub...


Thanks for your help !

Christophe


PS: the code where I create the textboxes:

For i = 1 to (lstFiles.listCount)
lstFiles.listIndex = i - 1
Load txtName(i)
txtName(i).top = ...
txtName(i).Left = ...
txtName(i).Text = lstFiles.Text
txtName(i).Visible = True
Next

VisualBasic 6 0 How To Add Help File
hi

plz help me out , i have problem in adding a help file to my application .
as the help file have different extentios like the open with systhelp or etc
yours sincerly
preetham

Get Last Created Folder And Last Created File In It
Dear all
Im writing a small VB program which will search the latest created folder in a specified directory. IT should tell me the latest folder created by time. and then it should also tell me the latest created file in that particular directory.


For example, lets say I have a folder "test" in c: , that is C: est, and in this folder i have 9 subfolders. So, if i give the program my test directory path C: est, then it should tell me the latest created folder. It should give me that name of the folder which was most recently created. Also it should also tell me which file is the most recent in this folder.

Please your urgent help is required.

Call Add-in Functions In VB
I have a Pi Processbook Add-in for Excel that I need to call from a VB module. Essentially, I need to setup a loop that will send the required data from VB to the Add-in and then have the Add-in refresh the values it outputs in the excel page in order to perform additional calculations I need outputted. This is something that I'd have to do 208 times over if I can't find the code for this so let me know if you need more info, the Add-in, anything! Thanks -Matt

How To Call These Functions From A DLL
I am a new VB6 user, and tying to acquire images from CCD cameras based on a SONY SDK DLL(IIDCAPI_SONY.DLL). There are two functions that I don't know how to declare and call with VB from the DLL. I would appreciate if someone would like to help me out.

1.
void* iidc_lockdata( HIIDC h, -1)

HIIDC h; handle to specify the camera

Return Values
If the function succeeds, the return value is pointer to frame buffer.
If the function fails, the return value is 0.

I tried the following code, but it doesn't work. I was trying to copy the frame to a data array by using CopyMemory
*************************
Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function iidc_lockdata Lib "iidcapi_sony" Alias "#37" (ByVal h As Long, ByVal X As Long) As Long

Dim DataArray (1 to 1280, 1 to 960) As Byte

Call CopyMemory(DataArray(1, 1), iidc_lockdata(h, -1), 1228800)
************************************


2.

bool iidc_attachbuffer( HIIDC h, void** param, long parambytes );

HIIDC h; handle to specify the camera
void** param; array of pointer to capturing buffer
long parambytes; the byte size of the parameter param

How to declare void**? It's a pointer to pointers.

Thanks!

Call Functions In A DLL
I have these two DLLs that I want to use (I did not write them).

This is how far I have so far:

I found out which methods are available by using a program to list functions in DLL (and their undecorated C++ names).

THen I use two API calls:

hLib = LoadLibrary ("mydll.dll")
fcn = GetProcAddress(hLib, "C++FcnName")

both calls work, i checked the return values and they are both non-zero.

What I don't know is, how do I call the function once I have a pointer to it??

C++ Call VB Functions?
I have a C++ dll that has some exports and a header...


Code:
int __stdcall decrypt(char *data, unsigned int len, unsigned char nokey);
int __stdcall encrypt(char *data, unsigned int len);


They are calling these functions fine. My question is, how can I implement these functiosn into VB? I have gotten this far:


VB Code:
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _(ByVal lpLibFileName As String) As Long Private Sub Command1_Click()LoadLibrary ("crypt.dll")End Sub


But now I'm not sure where to declare the 'encrypt' and 'decrypt' subs so that the DLL will call them?

Thanks in advance.

How To Call DDE Functions
Hi
I need to call DDEInitiate function from my VB project. I cant because it does not recognize it. Do i need to add a special component or something?

i.e.
ch = DDEInitiate("hi", "bye")

Thanks.

How To Call These Functions From A DLL
I am a VB6 new user, and tying to acquire images from CCD cameras based on a SONY SDK DLL(IIDCAPI_SONY.DLL). There are two functions that I don't know how to declare and call with VB from the DLL. I would appreciate if someone would like to help me out.

1.
void*  iidc_lockdata( HIIDC h, -1)

HIIDC  h;         handle to specify the camera

Return Values
If the function succeeds, the return value is pointer to frame buffer.
If the function fails, the return value is 0.

Public Declare Function(or Sub?) iidc_lockdata Lib "IIDCAPI_SONY.DLL"  Alias  "#37"  (ByVal HIIDC as Long, -1) AS ?

2.

bool iidc_attachbuffer( HIIDC h, void** param, long parambytes );

HIIDC h;           handle to specify the camera
void** param;       array of pointer to capturing buffer
long parambytes;  the byte size of the parameter param

How to declare void**? It's a pointer to pointers.

Thanks!


How To Read An Csv File From Visualbasic.
hi,
i had a file which is in csv format.
this is generated by a c++ file(Automated).
the file format is very unclear.
i removed the unwanted data from original file and tried to read it.iam also able to read it.

but i want to read particular data from the original file,ie the first row of the file i donot want to read.

and some columns i want to skip bcos those values are empty.

can any body help me...

varma_varma@rediffmail.com

Call Functions Using Variable
I have 3 child forms each with a similar save function:

formaSave
formbSave
formcSave

When each form loads, a global variable gets set as a string

frm = forma (or whichever form is loaded)

the 3 forms share a menu which has a save button, what I want to do is call the save function for the relevant form

Code:
Sub cmdSave_Click()
frm& "Save" ' which I would expect to concatenate to formaSave and call the function
End Sub
But I get the error "expected procedure, not variable"

Is it possible to call a function using a variable?

API Functions Call During Runtime
Hi Everybody !!

I'm trying to call DLL Functions during runtime, and i'm having a nervous breakdown with that problem !!

I know how to use Loadlibrary and getprocadress to get the function adress. But what do i have to do to :
1- Send arguments to the function ?
2- Call the function ?
3- receive output arguments after the function returns ?

It's really important to me, pleeeeaazzzzzzzzzzeeee HELP !!!

Using Variables To Call Functions
i have a several functions set up that all work fine when i call them

what i would like to do is call one of them by using a value in variable

i have read somewhere about CallByName being the solution but i can't seem to get it to work

this is the line of code i am using at the moment to call the function 'Runs_Per_Over' with the two parameters 'result_query_id' and 'n'


VB Code:
RPO = Runs_Per_Over(result_query_id, n)


any help would be most appreciated

Stored Functions Call.
Hi All,

Seems like no one is able to answer my question yesterday. What about another question here.

I have this picture box here, which maps to a real machine. (Width = Axis X, Height = Axis Y). When the user click on any spot on the picture box, my axes will move to that particular coordinate.

The problem here is if the user keeps clicking the picture box continuously, I want the [clicks] commands to be stored in a collection which will be executed continuously after the first motion has finished. The collection will act like a queue: First in, First out.

Currently, I'm storing the function calls in a collection and execute them one by one (after detecting the axes is motionless) under a timer (This timer class is written based on Woka's timer in a class) interval sub with the CallByName function. What I get when the CallByName is executed is an error like below:

"The callee (server[notserver application]) is not available and disappeared; all connections are invalid. The call may have executed."

What on earth does that mean? Can anyone help? It's quite urgent. Thanks.

Regards,
Jeremy

How Can I Call External Functions ...
How can i call external functions from with in a XSLT, say from a DLL or API call

If any one is aware...do help me

Reshu

Call Back Functions
hi - i'm Eran and i have a question about the Respond of a client
to Exe Server Notification implemented as Callback function.

generally , when i do asynchronues processing, i have a client that use
an activeX EXE component to do some Background Task ,and while he do that
(the component), the client can do other processings and will be Notified
by the component when the component finishes the job by Callback function.

now, i implemented this mechanizm but i noticed that if the client is busy
in some loop or somthing (means the Client process thread is doing some long
operation) so the Notification is Lost (or dont Accepted by the Client). also
no error is raised by vb (i accept to Server Busy or somthing like that).

so - how i promise that when notification comes it will be handled as soon as
it comes or may be queue'd until the thread is finish.

thanks - Eran

Call Functions From Active Dll
I have mad a program but want to put most of the code into a active dll so my program may call function when there are needed. How do I call functions from
within a active dll. Maybe anyone can give me a little info on that?!?

Self Extracting Zip File(for VisualBasic Application)
Hai Everybody,

I am downloading a zip file from vb application what i need is it should be self extract.

I have a program using which i can download a file from internet.

Thank you.

Open A Pdf And Mdb File Using Visualbasic Code
I am trying to open pdf and access files using vb code but no success.
can anyone help me.

Calling A VB Script File From VisualBasic
Could you any one give me hint on steps to RUN a VBScript (.vbs) file from a VisualBasic DLL. I dont want to wait for the response back.
Any help in this regard is appreciated.

Sree

Trying To Call Access Functions In Excel
I have an access database on one of our network drives that has some functions in it. One of the functions looks at data and manipulates it a certain way and I would like to be able to call into my excel files.



The creator of this program constantly uses it in access and is always updating the program. If I were to just simply copy and paste every once in a while I would miss any edits that he makes to the program. Another reason that I want to link to it is because many of us use this program and it would be great if we can just draw from one source.



So far I've got the following:


Code:

Sub Run_Func()

Dim obj As Access.Application

Set obj = CreateObject("Access.Application")

With obj

.OpenCurrentDatabase "\location omydatabase.mdb"

.Visible = True

.Run "macro1"

End With

obj.Quit

Set obj = Nothing

End Sub
This will run 'macro1' in database.mdb but I can't figure out how to run a function instead. HELP?!?! I'm almost there.....

Can A VB.net Dll Call Functions/subs In A (parent) VB6 Exe?
Can a VB.net dll call functions/subs in a (parent) VB6 exe?

I'm writing a plugin system for a VB6 application, and I want to write the plugins (DLLs) in VB.NET but they need to be able to call subs that exists in the main (VB6) execuateble (like adding text to a textbox, etc)

(How) Is this possible?

Build VB ActiveX Dll To Call Functions
Hello, I have a problem building and using an activeX dll. I would
appreciate it if anyone could help:

I have written some complex functions. I have a complex type with .real and
..imag part as follows:

Type Complex
Real As Double
Imag As Double
End Type

and several functions of the type:

Function Complex_Conjg(Compl As Complex) As Complex

The type and the functions work fine from within the project. Now, I would
like to include them in an activeX dll, and have them available for another
VB application from the DLL.

I do the following:

1. Start a new activeX DLL, include the type and the functions in the class,
build the xxx.dll.
2. Start a new application (standard exe), make a reference to xxx.dll, and
declare the functions in a module as (for the above function):

Public Declare Function Complex_Conjg Lib "xxx" (Compl As Complex) As
Complex

3. I see that the type Complex is now available for the new project. When I
press F2 i can also see the functions of the DLL. But when I Call the
functions from within the code, I get an error:

Run-time error '453':
Can't find DLL entry point Complex_Conjg in xxx

What is wrong? Is there a way to have the functions available for the new
project? Thanks in advance.

Call Multiple Functions At One Time
hey, I need to call more than one function at a time, not necessarily similtaneously, but perhaps a few milli-seconds apart. I tried stacking call commands on top of each other in code like:

Code:
call function1()
call function2()


..and of course i was disappointed to see each wait till the first to be called has finsihed then the next call would run.. so how can I run more than one function at one time?? If even possible.. I think maybe an api timer?? Any help? thanks



Edited by - 3mu180r on 5/29/2005 12:01:18 AM

How To Call The MS Access Module Functions
Hi Friends,

Anybody knows solution for this issue, pl. help me

I written a Function or Procedure in MS Access Module option. But i need to retrieve that function/procedure from VB source.

email id: gajulauma@yahoo.com

Best Regards
Uma

How To Call Functions In A Stored Procedure.
How to call Functions in a Stored Procedure.

Rdo Openresultset Call Functions Differently In XP And NT4?
Hello,
i have this openresultset piece of code that doesn't work properly in XP.

The oracle table is like myTable (Alpha number(3,2), CodeName varchar(2))

And the following piece of code (using RDO 2.0 library) :

Dim rdynAlpha As rdoResultset

Set rdynAlpha = rdoEngine.rdoEnvironments(0).rdoConnections(0).OpenResultset _
("SELECT ALPHA FROM myTable WHERE CODENAME = " & strCode & ";", _
rdOpenForwardOnly, , rdExecDirect)

doesn't return return the same item type for the colum ALPHA in my result set :

in the ORACLE table, if Alpha = 0.5 then :

in NT, rdynAlpha.rdoColumns(0) = 0.5 (type is rdynTypeNumeric)
in XP, rdynAlpha.rdoColumns(0)=5 (type is rdynTypeDecimal)

XP truncates the decimal point!!!!

What can I do to change that?

=>I'm totally clueless!

Allowing A User To Call Functions At Run Time?
I would like to allow my users to call functions/subs through a text box at run time, is this possible? and if so... how could I go about it..?

How To Call Functions In A VB Bas Module From A Web Page In A Web Browser Control
I think the subject says it all.

I want to have a web page (created on the fly) in a webbrowser control. The web page has a button on it and I would like to call functions in a bas module when the button is pressed.

Does anyone know if this is possible or of any alternative methods.

Project As Variable? Or How To Call External Functions From ActiveX Plugin
I wore ActiveX plugin for my project and i would like to use functions from main app in it.

Simplyest way i could think is somehow to pass Project1 (project name) and then use Project1.Module1.function()

Anyone got any ideas how to use main app's function in ActiveX plugin?

Btw. i know i can pass form and then use Form.Function() but i don't want to put all my functions on form

How To Invoke A File Inside Directory Each Time A New File Is Created
This is not a vb question.
How to invoke a certain software file inside a directory each time a new file is createdin the same directory automatically.
This is like a window event raised when a new file created in this directory that make other software file invoked.
Is this like a service in window 2000? Can any one help or give a hint to where to find help on this.
Can we do something like this without using visual basic or by setting some service inside setting or control panel?

How To Add Numbers To File Names When File Created?
Hi all . my current function writes all the values of url to one single .ram file but what i want to write each new url in sepearte file which has the same name as CurrID value. could any show me how that can be then.Thanks



VB Code:
Private Sub Command3_Click() Dim CurrID As LongDim CurrURL As StringConst sURL As String = "http://localhost/play.php?d=04&song=" For CurrID = [b]1500[/b] To [b]1590[/b] ' start of our for loop CurrURL = sURL & CurrIDText1.Text = CurrURL Dim fn As Long     fn = FreeFile  Open "C:song.ram" For Append As #fn  'Yes. Use Print #fn instead of Write #fn    'Write #fn, Text4.Text  [b]  Print #fn, Text1.Text[/b]  Close #fn        'Use your CurrID hereNext CurrID '---------------------- end of for loop  MsgBox " file written successfully to the file!" End Sub

Unload All Created Picture Box's [created @ Runtime] *slved*
Hey yer guys.

OK, i have some Picture Box's, which are created when a user enters my chat room, and then unloaded when the user exit's

These picture box's index are the connection index's to my chat server the user is using.. [ So they are unique to the user ]

Anyhow, i have got them loading when the user enters / leaves the room

But if I Leave the room i need to unload all loaded picture box's except the one with and index of 0

Now, how can i loop through each picture box, in the form?

IE: for unloading forms u can do:


VB Code:
Dim frm as formfor each frm in forms             unload frmnext frm


is there a way i can do the same for the picture box's?
[BTW: My name for the picture box's are "imgAV" [if that helps ne?]

Thanks

Unload Multiple Created Frames That Are Created At Runtime.
Goodday,

I want to unload frames that are created at runtime. They are dynamic frames and sometimes there are three
other times there are 5,7,44 etc. What i try to do is the following. remove all the frames that are in a frame except the
frame that has an index 0. I thought something like this works. but it doesn't

the created frames index number aren't sequential --> i.e. three frames: frm1(0) frm1(3) frm1(7)

Code:

dim frameremove as frame
   for each frameRemove in Frame4
       unload frameRemove
       set frameremove = nothing
   next frameRemove



I thought i would be similar like this.

Code:

Public Sub UnloadAllForms()
Dim Form As Form

   For Each Form In Forms
      Unload Form
      Set Form = Nothing
   Next Form

End Sub

Ctx File Not Being Created
Hi Team I have an ocx containing several controls (ctl files). All of the ctls create a corresponding ctx files except one. Has anyone encountered this before?

When does the ctx get created? Can I force it to be created?

Thanks FW

How Can I Tell What App Created A File?
For a variety of reasons, I'd like to be able to determine what application created a file before trying to open it. For example, in some scenarios I want my app to open a Word or Excel file and check it for metadata, but to ignore the file if it's a WordPerfect or database file.

I can't rely on the file extension, because user's don't follow the rules. I'm pretty sure there's a way to do this, because WordPerfect has a macro token that does it quite nicely -- even tells which version of the app saved the file. But I've never been able to figure out how to do it from VB or VBA.

Any help would be much appreciated.

File Is Not Created
Hi all,
I am working in Call Center. I am using MMcontrol to Record a call of each and every call. In my program when my agents gets call i have programmed that they will get the popup with the complete information of the client to whome they are talking.

Now my problem is that some times when they submit the page the voice file is not created. i have used the following code to record the recordings.

Private Sub Form_Load()
MMControl1.Command = "close"
MMControl1.FileName = "new"
MMControl1.Command = "open"
MMControl1.Command = "record"
End Sub

and when we submit page.

Filenames = CommonDialog1.FileName
MMControl1.FileName = Filenames
MMControl1.Command = "save"

It was working previously without showing any problem. It was working more than 2 years smoothly. But these days when we submit pages out of 5000 cases i found 2 or 3 no recording file. Please Help me

Copyright © 2005-08 www.BigResource.com, All rights reserved