Forum: C++ Sep 7th, 2009 |
| Replies: 8 Views: 297 You reminded me one of my interviews (that did not go that well :) ). Yes this is how you need to do it. |
Forum: C May 14th, 2009 |
| Replies: 3 Views: 693 For connection oriented UDP (like in your case), it is important to bind |
Forum: C++ May 14th, 2009 |
| Replies: 3 Views: 347 int DisplayMessageBox()
{
int msgboxID = MessageBox(
NULL,
(LPCWSTR)L"Sample",
Cap,
MB_YESNOCANCEL
);
switch (msgboxID) |
Forum: C++ May 14th, 2009 |
| Replies: 4 Views: 239 See this
http://www.codeproject.com/KB/cpp/Colored_Conslole_Messages.aspx |
Forum: C++ Mar 20th, 2009 |
| Replies: 38 Views: 3,144 It is not a Vista problem. Vista uses same APIs to shutdown the system.
You certainly have required permissions and privileges if you can shutdown the system by Shutdown.exe
You just need to be... |
Forum: C++ Mar 20th, 2009 |
| Replies: 38 Views: 3,144 Shutdown.exe uses InitiateSystemShutdownEx.
I have used this code on Vista and it works for me. |
Forum: C++ Mar 20th, 2009 |
| Replies: 38 Views: 3,144 1) Your code lacks the required privilage. You would need Shutdown Privilage enabled for the process which initiates the shutdown.
2) On server OS not everyone has shutdown privilage, you need to... |
Forum: C++ Mar 20th, 2009 |
| Replies: 38 Views: 3,144 how about trying this
#include <Windows.h>
BOOL MySystemShutdown()
{
HANDLE hToken;
TOKEN_PRIVILEGES tkp; |
Forum: C++ May 7th, 2008 |
| Replies: 1 Views: 1,827 About Messages and Message Queues (http://msdn.microsoft.com/en-us/library/ms644927(VS.85).aspx)
This talks about everything. Please let us know if you have any question. |
Forum: C++ May 7th, 2008 |
| Replies: 7 Views: 5,752 The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.
I suspect the window you are trying to hide processes this message and prevents itself from hiding.
... |
Forum: C++ May 7th, 2008 |
| Replies: 7 Views: 5,752 Does it happens with all the Windows or with any specefic Window ?
Are you trying to hide any window which you have created or any other applciaiton's Window ? |
Forum: C Feb 7th, 2008 |
| Replies: 4 Views: 783 I corrected minor syntactical errors in your code. I did not check the logic. Check following code.
#include<stdio.h>
#include<stdlib.h>
int find_transpose(int n, double **a, double **b)
{... |
Forum: C Feb 7th, 2008 |
| Replies: 4 Views: 783 What does not work? Does it gives you compile errors? Does it crashes? |
Forum: C++ Feb 5th, 2008 |
| Replies: 4 Views: 709 You may not need to lear about .Net framework as such for your project. It is a underline layer which helps managed code to run your system(It is not the only thing it does).
Sometime Windows... |
Forum: C++ Feb 5th, 2008 |
| Replies: 6 Views: 1,447 What is the error? You can always redifine _WIN32_WINNT as per your target OS |
Forum: C++ Feb 5th, 2008 |
| Replies: 4 Views: 709 How long did you wait after the hung? Does it hang your machine?
What is the .NET framework you are using? It takes longer if you have installed new version of framework sometimes as long as five... |
Forum: C++ Feb 5th, 2008 |
| Replies: 2 Views: 1,730 If you are targetting Windows.You will need to have Windows SDK to build your application. Windpws SDK comes with all the required header files.
You can download the letest SDK from... |
Forum: C++ Jan 29th, 2008 |
| Replies: 6 Views: 1,405 Hello Jason,
Simply speaking you cannot execute any application on a remote machine. There are many problems doing this. Apart from the implementation limitations there are some major security... |
Forum: C++ Jan 3rd, 2008 |
| Replies: 4 Views: 750 What is the error? Linking errors are different than syntactical error one can't find them looking at the code. |
Forum: C++ Jan 2nd, 2008 |
| Replies: 5 Views: 1,239 You need to catch the exception. You need to write a catch block. If you let OS to handle your first chance exception it is going to simply terminate the process because OS does not know which way... |
Forum: C Jan 2nd, 2008 |
| Replies: 5 Views: 1,021 @sivaslieko++ is it the 'if' not working or your logic is not working?
One unfortunate thing associated with computer is, it does not work the way you want it to work it works the way it should... |
Forum: C Jan 2nd, 2008 |
| Replies: 4 Views: 576 @cdijuste
You knew it didn't you?? "less or equal to" "<=" :) |
Forum: C++ Jan 2nd, 2008 |
| Replies: 5 Views: 1,239 @obscured47 You can do anything once you catch the exception.
Why do you want to throw an exception to pause the execution? There could be better ways to do that.
Can you post small segemt of your... |
Forum: C++ Jan 2nd, 2008 |
| Replies: 11 Views: 2,483 You may like to overload couple of operators in MyStr class to make it friendly. |
Forum: C++ Jan 2nd, 2008 |
| Replies: 11 Views: 2,483 @Max_Payne
You can not initialize arrays the way you are trying. However, you have exposed a good problem. How to initialize a constant string inside a class?
I have been facing these kinds of... |
Forum: C Jan 2nd, 2008 |
| Replies: 1 Views: 441 Which page are you talking about, web page ? |
Forum: Web Browsers Jan 1st, 2008 |
| Replies: 5 Views: 2,668 How this problem is related with C++?
Install letest update and try to repair it. |
Forum: C++ Dec 28th, 2007 |
| Replies: 7 Views: 2,421 See this (http://www.codeguru.com/cpp/cpp/algorithms/article.php/c5129/) and this (http://en.wikipedia.org/wiki/Self-balancing_binary_search_tree) |
Forum: C++ Dec 28th, 2007 |
| Replies: 7 Views: 2,421 Are you trying to write a balanced binary tree??
You should explore how AVL trees work. |
Forum: C++ Dec 28th, 2007 |
| Replies: 16 Views: 2,963 I believe we are confused in Initialization and declaration.
int i ; // declaration
int i = 10 ; declaration + initialization
i= 15 ; // assignment
You cannot only do initialization... |
Forum: C++ Dec 28th, 2007 |
| Replies: 16 Views: 2,963 Once you declare an array you just reserve some amount of memory. This memory contains garbage. if you try to print all values of the array just after delaring it you will see just garbage. See... |
Forum: C++ Dec 28th, 2007 |
| Replies: 5 Views: 832 >>ı selected debug from solutıon confıguratıon box.and then ı made breakpoınts then f5.but ıt dıdnt break the process and saıd that no labels were loaded
Do you see .pdb files created in debug... |
Forum: C Dec 28th, 2007 |
| Replies: 16 Views: 8,167 >>Only in that the heap can not access memory beyond the 4 gig boundry.
In fact heap can never access memory beyond 4 GB in 32 bit Windows Operating System.
I am sorry for not making myself... |
Forum: C Dec 28th, 2007 |
| Replies: 16 Views: 8,167 PAE does not have to do anything with Heaps. |
Forum: C Dec 28th, 2007 |
| Replies: 16 Views: 8,167 Seems I could not present myself correctly...
Heap and Virtual memory are different
see this for heaps
http://msdn2.microsoft.com/en-us/library/aa366711(VS.85).aspx
This... |
Forum: C Dec 28th, 2007 |
| Replies: 16 Views: 8,167 >>That also is implementation dependent. I think that is how it works in ancient 16-bit MS-DOS but things have change just a tad since the 1980s. Memory is no longer segmented like that.
I am not... |
Forum: C Dec 27th, 2007 |
| Replies: 16 Views: 8,167 Your heap is divided into segments you can have maximum 64 segments and each segment is divided into blocks. The blocks are the actuall memory you allocate.
The first heap block is an allocation... |
Forum: C++ Dec 27th, 2007 |
| Replies: 5 Views: 832 You can use Visul Studio breakpoints only if you launch the application in the debugger or if you choose to attach the running the process with the debugger.
can you let us know exact steps how are... |
Forum: C++ Dec 26th, 2007 |
| Replies: 30 Views: 2,886 See this
http://www.daniweb.com/code/snippet491.html
I wrote it long back.. There are many typos but you can see how do I document header of a function or a file.
However, this time your... |
Forum: C++ Dec 25th, 2007 |
| Replies: 9 Views: 1,171 @ Max_Payne
>>& toko: Are you reading: Teach Yourself C++ in 21 days [fifth Edition] ?
Cool !!
Anyways, that is a good book for starting!! |