|
Surprising!!! if a dll (not COM dll) uses C style functions, can it be used in VB/ASP language??? I think it can only be used in C language.
|
|
|
|
|
Refer this[^].
Prasad
MS MVP - VC++
|
|
|
|
|
mandanani wrote: Surprising!!! if a dll (not COM dll) uses C style functions, can it be used in VB/ASP language??? I think it can only be used in C language.
it can be used., just read my reply to swasti
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
How can we handle strings?? If we use char* for the strings, will we be able to call/use those from languages that dont support pointers??
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
We can use any class or object supported by that language in dll within the dll.
The only problem is it should return the datatype or object which is understood by other language.
Anurag Gandhi.
http://www.softgandhi.co.nr
|
|
|
|
|
Exactly, thats the reason why i suggested COM and BSTRs.
But i was asking if theres a way to use c style functions in other languages that dont support pointers.
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
Anurag Gandhi wrote: We can use any class or object supported by that language in dll within the dll.
The only problem is it should return the datatype or object which is understood by other language.
for that COM concept is there.. and it's very nice and well documented.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
swathi m wrote: If you want it to work with other languages you will have to make it a COM dll and use BSTRs.
simple win32 dll could be read by many other langauge for example you kernel32.dll, user32.dll and gdi32.dll are not com dll. still it used in VB app
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
swathi m wrote: If you want it to work with other languages you will have to make it a COM dll and use BSTRs.
This is the most apt solution. Go ahead with it. It will give you higher interoperability over different platforms.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing.
Oscar Wilde (1854-1900)
Regards...
Shouvik
|
|
|
|
|
MFC DLLs can be used only by MFC programs...
if you want it to be largely used, use the STL classes, or get down to the CRT with COM interface
|
|
|
|
|
toxcct wrote: use the STL classes
For other languages ? The OP wanted to use the DLL in other languages.
|
|
|
|
|
na for C++
but i proposed COM too
|
|
|
|
|
I think MFC Regular dll can be used by other applications also if i have used extern "C" to it.
Please tell me if I am wrong.
Anurag Gandhi.
http://www.softgandhi.co.nr
|
|
|
|
|
just read the MSDN
|
|
|
|
|
Anurag Gandhi wrote: I think MFC Regular dll can be used by other applications also if i have used extern "C" to it.
Please tell me if I am wrong.
MFC dll can be used by other language, till it not exporting function , which contain MFC specific decalartion like CString in above case.
I have used MFC COM DLL in VB Application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
toxcct wrote: MFC DLLs can be used only by MFC programs...
MFC dll can be used by other language, till it not exporting function , which contain MFC specific decalartion like CString in above case.
I have used MFC COM DLL in VB Application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
Anurag Gandhi wrote: extern "C" __declspec(dllexport) CString IndentCCode(CString strMyString)
It can be used only in application, where CString decalaration/defination is known!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
Hello All's
I am making an Modal dialog based application in vc++ using (MFC)
now my requirment is that to print bill report of particular product.
all record (like quentity of product,price of product ) pick from database
i used MySQL as Database.
Can any one give me any example of such type of report or any idea How can i do this.
Plz help me in this problem
Regard's
Kaushik
|
|
|
|
|
|
can u told me any simple example for this
Regard's
Kaushik
|
|
|
|
|
Currently I do not have any sample code with me. Google CPrintDialog, you can get code samples.
|
|
|
|
|
|
|
I have write code for this and I can easily get printer also
but when i fire print command a blank page come
I am understand where i make wrong
Regard's
Kaushik
|
|
|
|
|
Does your problem solve now or not?
|
|
|
|