|
Hi , just an question from a novice like me :
how to use #import in c programme ?
not c++ is there an directive like it for c ?
it's for use ADO in a c program
thank you
Adel
that which hesitates is lost.
that which hesitates is lost.
|
|
|
|
|
Hy everybody!
Can someone help me?
I have an Window with a RichEditCtrl on it,
and when it is minimized, and some text is inserted, the RichEdit just don't scroll, even doing LineScroll(int).
anybody haves any idea?
cheers!
|
|
|
|
|
Hi.
I try to find a way to capture and manage starting of all application under windows NT serie (NT4.0, 2K, XP).
I would like manage a log file and save into it when user start some specific applications.
- The first way is by using a new gina.dll with fonction like WlxActivateUserShell (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/wlxactivateusershell.asp)
But this solution is so constraining to use it.
- Second way using a Hook procedure. I try to capture the WH_SHELL type. But the hook capture only event from the window which manage the hook.
I install two hooks : one for mouse event and one for Shell event for all threads (dwThreadId=0 when calling SetWindowsHookEx function)
With my application i capture all mouse events for every process and windows. But only shell events for my application, for the other windows it's appear no shell events capture.
If some one have some cool ideas. Thanx
|
|
|
|
|
You might want to look at various investigations of PsSetCreateProcessNotifyRoutine, including this [^] one.
The method of user mode notification is the crucial element in this and similar apps. Test under stress.
|
|
|
|
|
How does PsSetCreateProcessNotifyRoutine() sound?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Third way:
Change the default value of
HKEY_CLASSES_ROOT\exefile\shell\open\command
to
"c:\\pathtoyourfile.exe" %*
Your app gets called for every dblclk on ANY exe.
Then ShellExecute the original app (from command line).
Peter Molnar
|
|
|
|
|
Does anyone know if BLOBs can be inserted into an Oracle database, via a VC++ client, by creating and executing a SQL insert statement. I seem to recall reading somewhere that BLOBs can only be inserted via calling a stored procedure in the Oracle dB.
|
|
|
|
|
We used ADO to connect to our Oracle database. ADO can get/set BLOB data by using a SAFEARRAY attached to a variant. I can provide more detail if desired.
--
Joel Lucsy
|
|
|
|
|
I would appreciate any detail you can provide. This is the first database task I've worked on. -Thanks!
|
|
|
|
|
First, we used the class found at http://www.codeproject.com/database/caaadoclass1.asp[^]
Then we did something like to add to the database:
<br />
CADODatabase db;<br />
CADORecordset rs;<br />
COleSafeArray sa;<br />
void *buf;<br />
_variant_t v;<br />
sa.CreateOneDim( VT_UI1, );<br />
sa.AccessData( &buf );<br />
<br />
sa.UnaccessData();<br />
v = sa.Detach();<br />
db.Open( "<some connection string>" );<br />
rs.Open( db.GetActiveConnection(), "select * from table", CADORecordset::openQuery );<br />
rs.Edit();<br />
rs.SetFieldValue( "blobfield", v );<br />
rs.Update();<br />
rs.Close();<br />
db.Close();<br />
The code to read is similar. Let me know if you need that also.
--
Joel Lucsy
|
|
|
|
|
Hi all,
I'm doing a C++ programming on mobile agents...and I've been trying to find a way to get the CPU and memory usage using C++, so exatly like what we can get from Windows Task Manager.
I've looked into GetSystemInfo() and GetProcessMemoryInfo(), but there's not much useful information that I can get from them...
Can sombody help me? Thank you very much
Clara~
|
|
|
|
|
You might want to look at CreateToolhelp32Snapshot , Process32First and Process32Next .
<EDIT>Ooops - my bad - was thinking of the Processes tab... </EDIT>
|
|
|
|
|
GetPerformanceInfo found in PSApi.h is useful for getting memory usage information. For the processor load information, I've got no clue.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
|
thx for all the suggestions....will go through them =)
Clara~
|
|
|
|
|
Now I create the dialog box and then I create one button control on dialog box.
Now my question is how I can click the button control after it will activate the windows Explorer.
|
|
|
|
|
I understood that you have a dialog box, with one button, and what you want to do is to fire up Windows Explorer when this button is clicked.
See ShellExecute method in the Platform SDK.
If this is not what you wanted, specify in more detail and/or write more clearly.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi,
Does anybody know how I can program in something like what Windows does when you double-click on a file? i.e. it automatically opens using the program you've specified for that file type. If it's a txt file it'll open with notepad or wordpad or whatever you use, a C++ file might open with editpad or VC++, a bitmap might open with MSpaint or whatnot.. etc, hopefully someone understands what I'm talking about.
Thanks
Kelly Ryan
|
|
|
|
|
In order for a document to be automatically opened by the correct application, the document resource identifier has to have the correct prefix that is specified under the HKEY_LOCAL_MACHINE.... Software....application name key within the registry of that machine.
This place persists all the info on a specific application.
When you create your application and a document with that application, the MFC library should assign the relevant resource ID to the new file and store it in the registry for you.
The start up code within the application sets the resource ID for you.
I hope this helps.
Joe
|
|
|
|
|
take a look at this Post[^]
I Dream of Absolute Zero
|
|
|
|
|
RChin wrote:
take a look at this Post[^]
Sorry, I need to get the hang of posting correct hyperlinks
I meant
This One[^].
I Dream of Absolute Zero
|
|
|
|
|
|
One solution is ShellExecute().
Kuphryn
|
|
|
|
|