Actually, I extracted both examples from a bigger IDE-based project and separately compiled them using the cl command line compiler, so there are no hidden temp files, pch files or whatever. The first one still compiles. And I just did a) a "clean"/"build" and b) a "rebuild all" on my original...
Hi all,
what do you think of the following?
Example 1 compiles:
class MyClass
{
public:
static void func();
private:
bool itsFlag;
};
void MyClass::func()
{
int i = itsFlag ? 0 : 1;
}
Example 2 does not compile:
class MyClass
{
public:
static void func();
private:
bool itsFlag;
}...
I am sure you already read this, however I am including it here:
1526/1527 ERROR: Memory allocation failure error_info
Description
An attempt dynamically to allocate memory from the operating system failed while trying to tpalloc() a buffer. Additional information is printed with the...
Hi,
I want to use SSL simply to crypt data. It is *not* important to me to validate the identity of the server. So how do I convince javax.net.ssl.SSLSocketFactory and SSLSocket to accept *any* server certificate when I open a connection in my Java client?
I created the server certificate...
Do you mean the internal shared-memory service request and response queues or the /Q system? If you are passing messages via the /Q system (i.e. using tpenqueue() and tpdequeue() or TMQFORWARD servers), backup is automatically because all queue messages are usually stored in a file that is...
Two steps are necessary: 1) Logon and 2) "Impersonation". Example:
HANDLE hToken;
LogonUser(localUser, NULL, localPassword, LOGON32_LOGON_BATCH, LOGON32_PROVIDER_DEFAULT, &hToken);
ImpersonateLoggedOnUser(hToken);
CloseHandle(hToken);
Of course, you have to add error handling etc.
hi dexy99,
a floating point constant like "3.1415" is assumed to be of double precision in C++ by default. Your compiler just warns you that you initialize a single-precision constant using a double-precision value - if you use many digits after the point they may actually be lost in...
I assume you do not want to know the working directory, but the directory where the .exe file is located.
The GetModuleFileName() Win32 API function tells you that:
TCHAR appPath[MAX_PATH+1];
if( GetModuleFileName(NULL, appPath, MAX_PATH) == 0 )
{
//failure
}
else
{
CString...
Error code 9 is the TPEPROTO error (protocol error). This usually means that a service was called in a context where this is not allowed. Without more information it is difficult to diagnose it ;-)
yes of course... and it would be bad style to do it before when the application *is* in the foreground (at least without asking the user to allow a user profile modification).
Ha! Found it in the MS Knowledge base: Call
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE)
and *all* the applications on your system behave like under Windows NT or 95 and can put themselves into the foreground - this is a global...
Hi,
does anyone know how to overcome the following restriction in the Win32 API under Win2K/XP?
"Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see...
strange - it should NOT work in Win2k, too, quote from the Win32 doc:
Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call...
No, you can force Win32 to lock memory into physical memory using the VirtualLock() function. Please look at the documentation of VirtualLock() for details because there are some prerequisites (all memory pages must be committed, there is a maxiumum of locked pages, etc.).
I think because EJBs objects are always used single-threaded by the container, the synchronized keyword is not meaningful at all. The container always ensures that there are no concurrent calls to the bean's methods including the predefined methods of the XxxxBean interfaces.
Hi,
I use JMS inside J2EE via a message-driven bean in a container-managed transaction. I use Borland Enterprise Server 5.0.1 that uses the SonicMQ JMS implementation.
Now I came across the following problem: When the transaction is set to rollback-only in the onMessage() function, SonicMQ...
oops... "has been rolled back ... before" is wrong. Should have been "has been marked abort-only ... before". The actual rollback happens after the last tpreturn().
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.