Search Results

Search found 39 results on 2 pages for 'viswanathan'.

Page 1/2 | 1 2  | Next Page >

  • RPC Runtime exception

    - by viswanathan
    Hi I am having an application which requires inter process communication between different processes in different machines. Assume i have 2 processes in different machines which communicate usnig RPC. Everything works fine in the normal case. Now if i remove network and reconnect the same my processes still work however what happens is sometimes an RPC call(which sends a message from one process on one machine to another process on another machine) fails with an error code value of 3765269347, which may not really make any sense. This failure occurs only sometimes and i have no clue as to why this occurs. Anybody knows any reason why this may occur or general network related RPC issues. Thanks in advance.

    Read the article

  • Exception while opening file

    - by viswanathan
    Hi I have a VC++ application and in my application i have some basic file operations. Below is the defaulting code CStdioFile cFile; CFileException e; CString sReport; CString sHtmlfile = "testreport.html" OutputDebugString((sHtmlfile)); if (!cFile.Open(sHtmlfile,CFile::modeCreate | CFile::modeWrite, &e )) { } The problem is my application executes this piece of code every few minutes. and it works fine. After several runs of the code the cFile.Open() function fails. I tried to get the error message TCHAR szError[1024]; e.GetErrorMessage(szError,1024); OutputDebugString((szError)); The irony is the szError error message is "No error occured". This again works once i restart my application. Any idea why this occurs. Thanks in advance.

    Read the article

  • Pointers to threads

    - by viswanathan
    Suppose i have pointer to a thread like this CWinThread *m_pThread = AfxBeginThread(StartThread, this, THREAD_PRIORITY_NORMAL, 0, 0); Now in my StartThread function assume i did all operations and the function returned like this UINT CClassThread::StartThread(LPVOID pVoid) { return true; } Will my m_pThread be invalid when the return statement is executed?

    Read the article

  • Unsigned Integer

    - by viswanathan
    I was curious to know what would happen if i assign a negative value to an unsigned variable. The code will look somewhat like this. unsigned int nVal = 0; nVal = -5; It didnt give me any compiler error. When i ran the nVal was having strange value. Could it be that some 2's complement value gets assigned to nVal.

    Read the article

  • Dangling pointer

    - by viswanathan
    How can the below code result in a dangling pointer. { char *cPointer = malloc ( some constant number ); /* some code */ free ( cPointer ); cPointer = NULL; /* some code */ }

    Read the article

  • Dangling pointer

    - by viswanathan
    Does this piece of code lead to dangling pointer. My guess is no. class Sample { public: int *ptr; Sample(int i) { ptr = new int(i); } ~Sample() { delete ptr; } void PrintVal() { cout << "The value is " << *ptr; } }; void SomeFunc(Sample x) { cout << "Say i am in someFunc " << endl; } int main() { Sample s1 = 10; SomeFunc(s1); s1.PrintVal(); }

    Read the article

  • Different types for declaring pointer variables

    - by viswanathan
    Consider the below 2 declarations. appears next to the datatype and not next to variable char* ptr1, * ptr2, * ptr3; //all 3 are pointers appears next to the variable and not next to datatype char *ptr1,*ptr2,*ptr3; //again al 3 are pointers Is there any difference in intepretation between the 2 declarations. I know there is no difference in the variables. What is the rationale behind introducing void pointers?

    Read the article

  • Conting of objects created in stack and heap for many classes

    - by viswanathan
    What is the best way to count the total number of objects created in both stack and heap for different classes. I know that in C++ new and delete operators can be overloaded and hence in the default constructor and destructor the object count can be incremented or decremented as and when the objects get created or destroyed. Further if i am to extend the same thing for object counting of objects of different classes, then i can create a dummy class and write the object count code in that class and then when i create any new class i can derive it from the Dummy class. Is there any other optimal solution to the same problem.

    Read the article

1 2  | Next Page >