|
You should really do your own homework, but I'll help you out just this once...
Tombstones
(adv) Not limited by the system's run length encoding limits.
(dis-adv) Can only be used once in an application.
Lock & keys
(adv) Easy to implement.
(dis-adv) Cannot be used in Unicode mode or when an app needs to divide by zero (eg: during complex mathematical computations).
Garbage collection
(adv) Can be used for procedures as well as functions.
(dis-adv) Not supported in languages like Java or C#.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
OK, you are right.
Thank you very much anyway, Ravi.
Regards,
Asim
|
|
|
|
|
Garbage collection
(dis-adv) Not supported in languages like Java or C#.
Are you sure with this?
|
|
|
|
|
I coded like this:
#pragma data_seg("Shared")
HWND g_hWndCaller = NULL;
HHOOK g_hHook = NULL;
#pragma data_seg()
#pragma comment(linker, "/SECTION:Shared, RWS")
but it does not work, why?
|
|
|
|
|
Do MSDN articles Q100634 or Q125677 help?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Just in case it is sotehing as STUPID as this..
I notice the documentation shows /INCLUDE, but the sample shows this:
#pragma comment(linker, "include:__mySymbol")
So, as a suggestion, why don't you try using all lowercase for the word 'section':
#pragma comment(linker, "/section:Shared, RWS")
Also, you might want to call your section something besides 'Shared' so you don't confuse the compiler or linker over another keyword. Use your company initialz in front of it or something..
#pragma data_seg("YCIShared")
HWND g_hWndCaller = NULL;
HHOOK g_hHook = NULL;
#pragma data_seg()
#pragma comment(linker, "/section:YCIShared, RWS")
|
|
|
|
|
Hi,
I am working on vc++ project and i have store the details of that application in registry, is it possible to rename a registry key(hive) through coding.
can anyone help me through this.
Thanks and Regards,
R.Sundaram.
R.Sundaram
|
|
|
|
|
There is no single function to do this. One way would be to use RegSaveKey() and RegRestoreKey() , but those only work on Windows NT 3.1 and later. Another way is to use a series of copy and delete calls.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
All:
I have created a process using CreateProcess() with a NULL executable module and the STARTUPINFO specifies tha the window is to remain hidden (which works). The question is how do I send this 'new' process a message to show the console window which was hidden during startup?
STARTUPINFO Task_SI;
ZeroMemory(&Task_SI, sizeof(Task_SI));
Task_SI.wShowWindow=SW_HIDE;
Task_SI.dwFlags=STARTF_USESHOWWINDOW;
Task_SI.cb = sizeof(Task_SI);
PROCESS_INFORMATION Task_PI;
CreateProcess(
NULL,
CmdStr,
NULL,
NULL,
0,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&Task_SI,
&Task_PI
);
After this process is initialized, a loop begins which checks to see if the process has completed and dispatches messages while waiting...
GetExitCodeProcess(Task_PI.hProcess, ExitCode);
while(*ExitCode==STILL_ACTIVE){
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Sleep(100);
GetExitCodeProcess(Task_PI.hProcess, ExitCode);
}
After the process completed the usual cleanup occurs.
CloseHandle(Task_PI.hProcess);
CloseHandle(Task_PI.hThread);
How do I send this process a message to display itself (the console window)?
Thanks In advance,
Wallacebw
|
|
|
|
|
Hi all,
I am faced with the following problem. I should call the functions of a DLL (whose source code is not available), which doesn't seem to be implemented using Activex technology, and is downloadable in a package very "Visual Basic-oriented". In fact, the zip file contains only the dll binary and a .bas module, which looks much like the VB version of a C++ header file. Here's an excerpt of the .bas module:
<br />
Attribute VB_Name = "AstronomyFuncs"<br />
<br />
Declare Sub aa_hadec Lib "astro32" (ByVal lat As Double, ByVal Alt As Double, ByVal Az As Double, ByRef ha As Double, ByRef dec As Double)<br />
<br />
Declare Sub cal_mjd Lib "astro32" (ByVal mn As Long, ByVal dy As Double, ByVal yr As Long, ByRef mjd As Double)<br />
Now comes the question: despite there's is no provision for use within a Visual C++ program (no .h, .lib, etc.), anybody know how to overcome this problem, i.e. how to call the methods from C++?
Any help will be highly valued.
Regards,
Emmanuele
|
|
|
|
|
If you know the name of the function, you can dynamically load your dll and then get the adress of the function. Take a look at LoadLibrary and GetProcAddress in the MSDN for more informations
|
|
|
|
|
Hi all,
I am faced with the following problem. I should call the functions of a DLL (whose source code is not available), which doesn't seem to be implemented using Activex technology, and is downloadable in a package very "Visual Basic-oriented". In fact, the zip file contains only the dll binary and a .bas module, which looks much like the VB version of a C++ header file. Here's an excerpt of the .bas module:
<br />
Attribute VB_Name = "AstronomyFuncs"<br />
<br />
Declare Sub aa_hadec Lib "astro32" (ByVal lat As Double, ByVal Alt As Double, ByVal Az As Double, ByRef ha As Double, ByRef dec As Double)<br />
<br />
Declare Sub cal_mjd Lib "astro32" (ByVal mn As Long, ByVal dy As Double, ByVal yr As Long, ByRef mjd As Double)<br />
Now comes the question: despite there's is no provision for use within a Visual C++ program (no .h, .lib, etc.), anybody know how to overcome this problem, i.e. how to call the methods from C++?
Any help will be highly valued.
Regards,
Emmanuele
|
|
|
|
|
Hello All,
I have a requirement wherein have 2 sql server databases(say machine1 & machine2).
I want to run a sql query on machine1 , which would copy 5 tables in a 'XYZ' database on machine2 TO 'XYZ' database on machine1.
Note : I have user/password for both the machines.
I tried this using BCP utility, but problem using BCP is, exceptions cannot be handled And if there is a network failure during the process of data transfer , the process console window window of BCP utility, remains still(stuck) and needs user input to continue.
Please send me a QUERY(I already know about the Export/Import in SQL Server Enterprise Manager, but i need a query to run from vc++) to copy tables between 2 sql servers. that query, i should be able to place between BEGIN & COMMIT Transaction Process.
Waiting for ur reply.
Regards,
Prax.
|
|
|
|
|
It sounds like you want a SELECT INTO query.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
In my vc++ application i have opened 2 CDatabase objects(dbtraget & dbSource). I want to copy database tables from dbSource to dbTarget , then how do i specify the the particular database in the "SELECT INTO..." query.
And where should i run this query, in
dbSource.ExecuteSQL(".....")
OR dbTraget.ExecuteSQL(".....")
Regards,
Prax
|
|
|
|
|
Have you seen here?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi!
I’m about to pass a VARIANT to a “COM-function”.
In the API I says I should pass: an Array of VARIANTS.
How do I create the array.
I have looked at the function SafeArrayPutElement(…) and managed to pass an Array of BSTR… but I do need to pass it like an VARIANT Array….?
Tips?
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi!
I'm going to code an application which uses the IrDA-devive of my PDA. Until now everything is going ok, but now i stuck at the question how to create specific frequencies and single pulses of a specific length. I've read in the source of win-lirc that pulses can be created by setting SETDTR & SETRTS, but it never worked at my application.
Hope that someone can help me with that
Thx a lot for all replies
shi`BBy
|
|
|
|
|
i would like to know how to change the font size using MFC. don't reply that there is an existing article with source code, that one i tried and it has some restrictions as it is not derived from CMenu.
|
|
|
|
|
Hi all,
how can I create a COM in VC++.NET, which project template should I choose ?
Thanks
Patrick
|
|
|
|
|
There should be a template for MFC app. or ATL app. Choose one of those and you will be presented with further options.
Kevin
|
|
|
|
|
Hi guys,
Can anyone explain the differences between the following two calls:
UpdateWindow(hWnd);
and
InvalidateRect(hWnd, NULL, FALSE);
If I replace one with another, the app would be drawn differently. But I couldn't tell why by reading the MSDN docs
Thanks alot
|
|
|
|
|
I think I sort of know now -
UpdateWindow(hWnd) only places a WM_PAINT message in the message queue, which leads to an execution of the WM_PAINT's message handler finally. If at that time the client area is all validated already, the window will not be re-painted.
On the other hand, InvalidateRect(hWnd, NULL, FALSE) explicitly invalidates the client area and then sends a WM_PAINT message. This makes sure the window will always be re-painted when the WM_PAINT message handler reaches its time. It does two things instead of just one.
Please correct me if I am wrong here.
Thanks
|
|
|
|
|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|