|
Just follow what Dominik Reichl said in the first comment about ensuring that memory allocated in the DLL is released by the DLL again. Return the char-pointer to the DLL and let the DLL release it again.
|
|
|
|
|
return data char* is locally defined in DLL.
so how can release memory of that variable after returning
char* variable
|
|
|
|
|
When returning the char* then you take a copy of the char*, but they both point to the same memory in the heap of the DLL.
Just pass the copy of the char* from the application to the DLL again, and let the DLL release the memory in its heap.
You might consider returning a CString instead of a char*, and ensure that when the CString moves from DLL boundary to the Application boundary that a copy is made of the CString.
|
|
|
|
|
I have try but it is not working.
return char* is defined in dll's function as a local variable.
it will work well when we defined static variable. but i don't want
to create static variable in my DLL.
|
|
|
|
|
Thank you for confirming this. I'm in a situation myself where I'm considering to convert static-libraries into DLL's to improve linker times. The entire application is already using runtime library as DLL, so the conversion should be a matter of exporting all needed classes in the static libraries.
|
|
|
|
|
Hi...
i am creating a application in win32. i need to access the sql or MSAccess databse. but i don't know how to connect win32 application with sql or MSAccess database. please can any one help me?
thanking you
G.Paulraj
|
|
|
|
|
Are you using MFC? If so, then the MFC database connectivity classes[^] will be useful.
If you're not using MFC, then the ATL database classes[^] may be useful.
Other alternative technologies are ODBC[^], ADO[^] or DAO[^]. They'll all be painful (to some degree) to use with raw C++.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
How about reading about these api's from MSDN SQLHandle,SQLAllocHandle, SQLSetEnvAttr, SQLAllocHandle, SQLConnect, SQLAllocHandle, SQLExecDirec.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: SQLHandle, SQLAllocHandle, SQLSetEnvAttr, SQLAllocHandle, SQLConnect, SQLAllocHandle, SQLExecDirec.
Apparently, you want him to read-up about SQLAllocHandle() thrice?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
It's a very important function
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Makes perfect sense.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
hi i need the vc++ code that as to read chm file format.
thanks in advance
|
|
|
|
|
I hope the HTML Help SDK[^] may be of help to you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi ,
Im new to VC++...May i know what"s the difference b/w MFC and vc++ and where to start with...
im planning to start with Programming windows with MFC (Jeff procise)..
Please correct me if im wrong...
|
|
|
|
|
Visual C++ may refer to the Microsoft C++ compiler, or even the IDE. You can think of it as C++ on windows. MFC is a c++ framework written around Windows APIs to make life easier. Wikipedia has separete entries for Visual C++[^] and MFC[^]. Give them a read.
p_1960 wrote: im planning to start with Programming windows with MFC (Jeff procise Prosise)..
That would be a very good start if you are good at object oriented programming, specifically C++. (But legend says that you must start off with Win API and then move forward to MFC, not that it is a rule though)
Good luck with your learning. It must be fun.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
When I Captured video from webcam up to 30 seconds ....avi file is taking upto 80 MB...How to reduce the size of .avi file in KB ..Plz Help me..
|
|
|
|
|
AVI compression looks like a viable option? There are video compression libraries on the internet (some with source code and samples).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Dear All,
I have created a dll in vc and exported some function. How can get ordinal value from function name in vc? I searched on google but could not find the result which I was looking for.
Thanks
Manish
|
|
|
|
|
solve the following system:
2x1-x2=1
-xi+2xi+1=0, i=1,2,.....,n-2.
-xn-1+2xn=1.
Using a)thomas method,
b) Jacobi method,
c) SOR scheme (use w=1 (Gauss-Seidel), w=1.1, w=1.2, w=1.3, w=1.4, w=1.5).
Use intial approximation x^(0) e=10^-6. Limit the maximum number of iteration to N=500. Display the output in the following form:
Number of iteration for convergence:?
Solution:
x1=
x2=
.
x20=
|
|
|
|
|
I'm not doing your assignment for you - but Google[^] can help you find pages like this[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Hi
If this is your problem:
2x1-x2=1 ...................[1]
-xi+2xi+1=0, i=1,2,.....,n-2. .....[2]
-xn-1+2xn=1 ......................[3]
solution:
from [1] you get:
x(2)= 2*x(1)-1
from [3] you get:
x(n-1) = 2*x(n) -1
from [2] you get:
n= ? : rem n value should be set
for j=1 to 50
rem 50 is max iterations set to.
for i=1 to n-2
if i=2 then
x(2)= 2*x(1)-1
end if
x(i)= 2*x(i+1)
next i
x(n-1) = 2*x(n) -1
next j
Remark: I hope I understood your problem, since the solution
correctness depends on that too.
If your your problem is not stated correctly, that
belongs to you.
I hope that I helped, if you need more let me know.
|
|
|
|
|
Alright, I'm trying to have my program, which was writting in C++ using Dev-Cpp 4.9.9.2, open a separate program.
I know this can be achieved throw the use of system() but I can't seem to get it to work right, I'm currently using the command line:
system("c:\\Program Files\\Internet Explorer\\iexplorer.exe"); I get the error "'c:\Program' is not recognized as an internal or external command, operable program or batch file."
|
|
|
|
|
- It's just a command line, as passed to CMD, so put double quotes around the path as it contains spaces:
system("\"c:\\Program Files\\Internet Explorer\\iexplorer.exe\"");
- Isn't it iexplore.exe, not iexplorer.exe?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|