|
As far as i know there is no reliable way to do this across all drivers.
As i understand things (YMMV) :
When you call SQLExecute*() many drivers will return before the complete result set is built - that is they work async. This is not the same as using SQLSetStmtAttr(SQL_ATTR_ASYNC_ENABLE). This is more likely for static forward-only cursors.
The idea is that they can keep chugging away at building the result set as you pull results out of the set via SQLFetch*().
The upshot is that the total number of rows may not be known at the time SQLExecute*() returns.
There are ways to force the issue, but they all introduce significant overhead.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I've built a custom appwizard that creates an ActiveX Component project in the way I want it to, but I'd like to add functionality to it so that it can create projects that are more complex. The wizard presently creates files for a simple class structure, but I'd like it to be able to create a class hierarchy, requesting the number of and the names of the derived classes, and I'd like it use the same template files for creating each derived class (with different value(s) placed into the m_Dictionary variable). Is this possible?
-Rob
__________________________________________________________________________
....you guys start coding and I'll go ask them what they want it to do....
|
|
|
|
|
Hi Friends,
I have some set of problems. Please help me in solving these problems.
1) How can I print to default printer. I tried it by using.
CPrintDialog mPrintDialog(FALSE);
if(mPrintDialog.GetDefaults())
{
CDC dc;
dc.Attach(mPrintDialog.m_pd.hDC);
this->PrintClient(&dc, PRF_CLIENT);
}
But this did not worked. Please help me with this problem.
2) I am using MDI application. I tried to handle WM_KEYDOWN of CMainFrame class inorder to capture ESC key.
But it did not worked. Actually when ever ESC is pressed I want to close the application.
3) My another problem is I want to make my application Full Screen. Like I want my view to be of Full screen. When ever user double clicks on the view. I have to make the view a Full Screen. I don't want to see the Background Frame Window. I want my application View to be screen occupyieng whole Monitor screen.
Please help me as soon as possible.
Thanks for your help!!!!
If you have faith in the cause and
then means and in GOD, the hot
Sun will be cool for you.
|
|
|
|
|
DELIVER THE PROMISE wrote:
But this did not worked.
Which means nothing useful. What did not work about it? Was there a compiler/linker error? Did an assertion fire? Was an exception thrown? Did you single-step through the code to see what condition might have cause it to "not work?" What type of object is this ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Please help me!
This is not answer to my question. This is very very urgent.
Thanks & regards,
Promise
|
|
|
|
|
David was asking you to expand on the information you have given in order to have a better understanding of your problem.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I'm glad to see that at least one person understood where I was going with my inquiries!
Maybe I shouldn't have been so hasty to drop out of mind-reading school.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
For point 2. Have you tried setting up accelerator keys? Have one that handles ESC.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello.
Could you please help me. I need to customize regular Folder view. I
need to split it in two parts:
1)To have regular detailed view on the top.
2)To have another view which will show some additional information
about the file selected in the detailed view at the bottom.
Is it possible to achive that using Shell Extensions?
Thank you.
|
|
|
|
|
Hi,
I'm writing a Flight Simulator DLL, the DLL creates a thread that runs a UI that runs as a child of FS.
Now not any problem in FS window mode, but when I switch to full screen mode and click on the UI (which is shown on top of FS in full screen), windows deactivates the flight simulator by minimizing it and also minimizing the UI.
Without a thread it was working, but I wanted a sep thread for the UI since code behind the UI is doing expensive work.
I create the dialog as follows:
MyEnumWindowsProcCls Cls;
Cls.dwProcessId = GetCurrentProcessId();
Cls.hWnd = 0;
Cls.dwThreadId = 0;
EnumWindows(EnumWindowsProc,(LPARAM)&Cls);
fsWnd_ = new CWnd();
fsWnd_->Attach(Cls.hWnd);
dlg->Create(IDD_MAIN, fsWnd_);
The EnumWindowsProc catches the FS window:
BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam)
{
static MyEnumWindowsProcCls* pCls=(MyEnumWindowsProcCls*) lParam;
DWORD dwProcessId;
DWORD dwThreadId;
dwThreadId=GetWindowThreadProcessId(hWnd,&dwProcessId);
if (dwProcessId==pCls->dwProcessId)
{
char clas[512];
GetClassName(hWnd,clas,sizeof(clas));
HWND hWndParent=(HWND)GetWindowLong(hWnd,GWL_HWNDPARENT);
if (hWndParent==NULL)
if (strcmp(clas,"FS98MAIN")==0)
{
pCls->hWnd = hWnd;
pCls->dwThreadId = dwThreadId;
return FALSE;
}
}
return TRUE;
}
Anybody an idea of what I'm doing wrong? Is it possible at all to create a child window in another thread?
Thx
Kenny
|
|
|
|
|
Kenny Moens wrote:
Is it possible at all to create a child window in another thread?
Yes, but the secondary thread will need its own message pump. Check out this article for more detail.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
That's what I did already :s
|
|
|
|
|
Are you only accessing the window from within the thread that creates it? If not you are likely to have problems as Thread Local Storage is used extensively in windows.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi all,
I am working on converting some images into BMP format and the given images are in *.LL1 and *.LT1 formats. After converting them into BMP I have to display them in an interface that I am goin to build. (i.e when I select an Image file of any of those two formats fromt he 'open' menu item then it should display the image on a seperate window after doing all the process of changing the format into BMP. ( I am having the header information of the other two formats, but i don't know if it helps)
Anybody having ideas or suggestions of how to convert an image format in VC++, plz lemme know and I appreciate ur help.
I hope I am clear in problem description.
thanks in advance,
Pavan.
|
|
|
|
|
I have an options dialog in an app I'm building (an intranet bug reporter/tracker). I would like to be able to put an option in for the user to select whether or not they want the app to run at startup. How can I programmatically create a shortcut and place it in the user's startup folder if they choose this option? Thanks in advance
[insert witty comment here]
bdiamond
|
|
|
|
|
Check out the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
To create a link, check out the IShellLink interface.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Does anyone have some code snippets, or a suitable URL, to assist me in watermarking my C++ (unmanaged) code ?
Programming from a spec is like walking on water ......
Its Easier once frozen
|
|
|
|
|
hmmm... to be precisely.. these kind of questions are not very popular here...
you can't just watermark "C++ code"... you have to watermark the whole exe/dll/sys/etc file.
Don't try it, just do it!
|
|
|
|
|
The only time I've ever used the word "watermark" was in the context of an image within Word. How is it being used here?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
maybe he's talking about obfuscating his code ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I've seen enough of that without adding watermarks to the mix. Some folks just naturally write obfuscated code.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I want to receive characters from the serial com with 115200baud. In general my code works but
it has a small bug and I don't know why. Maybe someone can help me.
My problem is: Sending >820bytes by a commercial program to my code, my code receives just 820
bytes only. After the 820bytes WaitCommEvent() doen't recognize any incomming characters any more.
Here is my code:
================
* Open com port:
m_hPort = CreateFile(sFile, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);<br />
<br />
m_DCB.DCBlength = sizeof(DCB);<br />
GetCommState(m_hPort, &m_DCB);<br />
<br />
m_DCB.BaudRate = m_stCalibration.BaudRate;<br />
m_DCB.ByteSize = m_stCalibration.ByteSize;<br />
m_DCB.Parity = m_stCalibration.Parity;<br />
m_DCB.StopBits = m_stCalibration.StopBits;<br />
m_DCB.fDtrControl = DTR_CONTROL_DISABLE;<br />
m_DCB.fRtsControl = RTS_CONTROL_DISABLE;<br />
SetCommState(m_hPort, &m_DCB);<br />
SetCommMask(m_hPort, EV_CTS | EV_DSR | EV_ERR | EV_RXCHAR | EV_TXEMPTY);<br />
<br />
m_pListenerThread = AfxBeginThread(listener, this, THREAD_PRIORITY_HIGHEST, 0, CREATE_SUSPENDED, NULL);<br />
<br />
m_pListenerThread->m_bAutoDelete = FALSE;<br />
m_pListenerThread->ResumeThread();
* Read thread function:
listener (void)<br />
{<br />
DWORD dwBytesRead;<br />
DWORD dwBytesWritten;<br />
DWORD dwEventMask;<br />
BYTE szBuffer[MSGFRAME_MAX_LEN];<br />
DWORD dwOverlappedResult;<br />
DWORD dwLastError;<br />
BOOL bResult;<br />
DWORD dwDontCare;<br />
<br />
memset(szBuffer, 0, MSGFRAME_MAX_LEN);<br />
<br />
SetCommMask(m_hPort, EV_RXCHAR);<br />
WaitCommEvent(m_hPort, &dwEventMask, &m_stReadOver);<br />
while(1)<br />
{<br />
if(WaitForSingleObject(m_stReadOver.hEvent, 1000) == WAIT_TIMEOUT)<br />
{<br />
checkCalibration();<br />
continue;<br />
}<br />
<br />
dwOverlappedResult = GetOverlappedResult(m_hPort, &m_stReadOver, &dwDontCare, FALSE);<br />
if (dwOverlappedResult != FALSE)<br />
{<br />
bResult = ReadFile(m_hPort, szBuffer, 1, &dwBytesRead, &m_stReadOver);<br />
if(bResult != FALSE && dwBytesRead == 1)<br />
{<br />
m_stRingBuffer.RingBuffer[m_stRingBuffer.dwEnd].yChar = *szBuffer;<br />
m_stRingBuffer.dwEnd = m_stRingBuffer.RingBuffer[m_stRingBuffer.dwEnd].dwNext;<br />
m_pRingBufferFilled->SetEvent();<br />
<br />
}<br />
else if (bResult == FALSE && GetLastError() != ERROR_IO_PENDING)<br />
{<br />
}<br />
<br />
ResetEvent(m_stReadOver.hEvent);<br />
WaitCommEvent(m_hPort, &dwEventMask, &m_stReadOver);<br />
}<br />
}<br />
return;<br />
}
Thanks in advance )
Michael
|
|
|
|
|
Hi,
How to get the target file for a particular shortcut icon. This SHGetShortcutTarget API is only for CE OS. Is it possible to get the target for other OS.
Thanks is Advance
Baskar
|
|
|
|
|
Check out IShellLink::GetPath() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am working in windows programming, in that I cant use this method (IShellLink::GetPath()). Is there any API to find out.
Baskar
|
|
|
|