 |
|
 |
I have done the "Calling a VB ActiveX DLL from a MFC Client" exercise successfully.
I have a requirement that, adding a new Public function (eg fncDLL2())in VB DLL and make dll.
Now without building the vc++ application replace the dll in the current folder and run the exe. When i did the same i am getting "Creation Failed" error.
Please try to give the solution to my problem
|
|
|
|
 |
|
 |
I can easily make DLL using C# code by running it in Command Prompt . But when I create Dll using VB Dotnet it produces error relating to Namspaces used in the code.
For Example : System.Data , System.Data.SqlClient Errors.
|
|
|
|
 |
|
 |
Thank you for the post !
A have such DLL component, but it has also some event functions. How do you handle the event(s) from the DLL in the client VC++ code ?
|
|
|
|
 |
|
 |
My Vb function is like
Public Function trytt(strContent As Variant)
If IsArray(strContent) Then
......
End If
End Function
How to pass a CString Array in VC to this function?
Interest is the most important things
|
|
|
|
 |
|
 |
Anybody knows, How to dynamically include the dll?
Actually the above example states the static linking....( ie. we are hardcoding the dll name in the import statement )
Jothi Murugeswaran.S
|
|
|
|
 |
|
 |
Hi Friends,
I Need to use a dll in my VC++ 6.0 console project, what could be the necessary steps to import the dll into our project.
Actually i was advised to do as follows,
i was assumed of having a VB ActiveX DLL with a class called Test, which has a method called TryItOut().
#import "test.dll" no_namespace named_guids
void main()
{
_TestPtr pTest = 0;
HRESULT hres = pTest.CreateInstance ( __uuidof(Test) );
pTest->TryItOut();
}
But it doesn't work and i got error as undefined struct Test, undefined tryitout().
What could be the wrong ?
Pl anyone answer me,
Thanks in advance.
Ganesa moorthy
Thanks a lot
|
|
|
|
 |
|
|
 |
|
 |
Hi
Tanks for your Paper
I use it and resolve My first problem Completely
But I Have An VB6 ActiveX DLL with 2 problems
1- I can not Call a Method with ByRef Argument From VC++ .net (method is in VB6 ActiveX DLL )
2- I Can not Pass a String Value to a Method in VB6 ActiveX DLL
please guide me
regards
Sanahmm
Mazdisna
|
|
|
|
 |
|
 |
I use a .NET ClassLibrary which in turn refers a COM DLL (for which i have done all the tlbimp, regasm, gacutil and tlbexp)
but when i used the sample code (little throw in to MFC), the app shows a First chance unhandled exception and is not able to call that exposed method in the .net classlib;
my registry, assembly all looks fine and i could get the right pointer also after creating the cocreateinstance of my interface.
any thoughts on why would it crash ?
MY SAMPLE CODE IS
CoInitialize(NULL);
Empty::Really *ptr = NULL;
Empty ::ReallyPtr Work(__uuidof(Empty::Form1));
ptr = Work;
int nResult = ptr->GetPicture(); // IT CRASHES HERE - FIRST CHANCE EXCEPTION
CoUninitialize(); //Unintialize the COM library
|
|
|
|
 |
|
 |
Hi,
I want to know the diff. between Normal com dll and com activex control.
Here you are using only com dll, not Ax ctrl. , I think.
Thankx,
GAN
|
|
|
|
 |
|
 |
I downloaded the source codes in this page, and I built it using MSVS 2003. When I run the .exe file and clicked the VB button, the output was "creation failed"...is this the supposed output that we were expecting.
Thanks
|
|
|
|
 |
|
 |
You have to register the dll.
The #import statement has to reference the same dll that is referenced in the system registry.
|
|
|
|
 |
|
 |
Hello
I absolutely don't understand why Amit Dey omits an extremely important part?
He explains all the steps to create the VB and VC projects but he doesn't write one word about registering the DLL.
That's strange.
If you just follow the instruction you will get a "Creation Failed" error.
Create a text file in the project directory with the following content and name it "Register.bat"
regsvr32 prjdll.dll
After executing it, the project will run without error.
It is also interesting to view the registered DLL ("prjdll.csdll") in the tool "Ole View" which comes with Visual Studio. There you see all interfaces like IDispatch, IConnectionPoint, IExternalConnetion, IProviderClassInfo and more.
After rebuilding the VB project you must copy the DLL to the VC directory and completely rebuild the VC project!
Visual Studio 6: Menu "Build" --> "Rebuild all"
Elmü
|
|
|
|
 |
|
 |
I got benifit from your help, thank you! I tried many times, but still I only got a "Creation Failed" error. And I don`t really understand why not "prjdll.dll" in "hresult=CLSIDFromProgID(OLESTR("prjdll.clsdll"), &clsid); ".
Would you please help me?
|
|
|
|
 |
|
 |
HKEY_CLASSES_ROOT\CLSID\..\ProgID
default value
Get the name from the Registry.
Just writing to help maintain the records.
|
|
|
|
 |
|
 |
I have just found the answers. Thank you!
|
|
|
|
 |
|
 |
Hello,
I tray same with a dll create in C#. When i import in stdafx.h i have a error:
fatal error C1083: Cannot open type library file: 'LogLibrary.DLL': Error loading type library/DLL.
Error executing cl.exe.
When i want to import in vc a c# dll how i have to do?
Thanks,
Mihai
|
|
|
|
 |
|
 |
hi
I have a VB ActiveX Dll called SQLBuilder that contains a function called Init.
When I import this Dll and call Init as given below in my ATL Project, I am getting the following error:
Code:
SQLBuilder::_clsSQLBuilder FAR* pSQLBuilder;
CLSID SQLBuilderID;
hr = CLSIDFromString(cstr,&SQLBuilderID);
if (SUCCEEDED(hr))
hr = CoCreateInstance(SQLBuilderID, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (void **)& pSQLBuilder);
pSQLBuilder->Init(szSessionXML);
Error:
error C2660: 'SQLBuilder::_clsSQLBuilder::Init' : function does not take 1 arguments
the function signature from type library is given below:
virtual HRESULT __stdcall Init (
/*[in,out]*/ BSTR * xmlSession,
/*[in]*/ VARIANT vtArgument,
/*[out,retval]*/ VARIANT_BOOL * _arg3 ) = 0;
can anyone help me what is wrong.
Thanks in advance
Shenthil
|
|
|
|
 |
|
 |
hi
there is problem in my project where i need to call the vb dll function in vc++ dll ,but the function is not getting called so if anybody can help please help me slove this problem
|
|
|
|
 |
|
 |
How can I create an ActiveX object in VC++ Application and use its methods in a Visual Basic Script.
I was creating the object directly in the script, something like this:
SET ObjectName = CreateObject("ControlName")
ObjectName.Method(Parameter1)
But now I need to create the object in my application´s code and continue using the Control ActiveX methods in the Script.
Is there a way to do this??????
Thanks in advance : )
|
|
|
|
 |
|
 |
Hi,
I am trying to open a workspace with VS 6.0, but it gives me blank workspace. when i try to create a new workspace and .dsp project, it gives the error "This makefile was not generated by developer studio"
then offers to wrap it for me.
All the dependent and linked files are present and are in proper path. does anyone has any clue about it.
Rgds
Jaffar
|
|
|
|
 |
|
 |
Got the solution.. it seems the .dsp file was saved in Unix format. open in a wordpad and save it again resolves the problem
Rgds
Jaffar
|
|
|
|
 |
|
 |
Hi,
I am trying to send a string from vc++ dll in lparam of sendmessage to vb application. but when i typecast lparam to string, i dont get the string..( long value)..
can some one provide the snippet of code for it..
thanks
Jaffar
|
|
|
|
 |
|
 |
You cann't directly cast the CString object to lParam;
You can cast the address of CString object to lParam.
CString str;
SendMessage(,,(LPARAM)&str);
in the Target funtion you must resolve the lParam to CString Object.
Prosanta
(prosantalangtha@yahoo.com)
|
|
|
|
 |
|
 |
hello,
please tell me how to load and run the vb form in vc. the vb form is connected to a database (Ms Access) using dao in refernces. also the problem is coming if i load a form in vc but the form not interacting with database in vc.
please email me ur ans to address (salman.khalid85@gmail.com)
|
|
|
|
 |