|
and no need to repost !!! you can only edit the previous one instead of have several thread on the same topic
|
|
|
|
|
sorry thnks for ur advice!!!
now some one help me in this plsss
|
|
|
|
|
You do not have access to the physical memory addresses in user mode. Only kernel mode drivers can do that.
|
|
|
|
|
HI.
I can't understand something. I have a DLL which has a class that calls a function that is the following:
DWORD dwLen = GlobalSize(m_hDevMode);
BYTE* lp = (BYTE*)GlobalLock(m_hDevMode);
file->Write(&dwLen,sizeof(dwLen));
file->Write(lp,dwLen);
file->Write(&dwLen,sizeof(dwLen));
GlobalUnlock(m_hDevMode);
Now, when I put the .h and .cpp file of the class directly in my application directory and use the class, it works fine. But when I call the class and this function exporting/using it from the DLL, it gives me warnings and does not work. It will comile but when I run the function that calls this function, it does not work.
Can anyone helpl shed some light on this? Or how would I "fix" this?
Thanks ahead of time.
|
|
|
|
|
Stan the man wrote: But when I call the class and this function exporting/using it from the DLL, it gives me warnings
And what are those warnings ?
Stan the man wrote: and does not work.
Can you explain this ?
|
|
|
|
|
Hi!
How do I do to show a picture (.bmp)in a box when I press a key?
For expl. when press key "s" to show the picture1, when press key "d" show picture2, etc. ...
(sorry for my english)
pls help me!
(A small aplication it will very good)
10x
|
|
|
|
|
See WM_KEYDOWN and WM_KEYUP and for load you can use of LoadImage if its bmp
|
|
|
|
|
Which bit do you need help with ? The key press is easy, to show images, a picture box works best. The LoadImage API will load a bmp, to load jpg/gif/png, you need to use GDI+. I have articles on this, if you are using VC6, you will have trouble, but the newer compilers have GDI+ built in. VC6 is unsupported, and you need an out of date SDK to make GDI+ work with it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
gigel007 wrote: How do I do to show a picture (.bmp)in a box...
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Just a general question on CreateEvent() and WaitForSingleObject()
Just looking for an easier method of waiting for an external event to take place.
I was using the following code:-
while(waiting)
{
Sleep(100);
ProcessMessages();
CheckForEvent();
}
void ProcessMessages()
{
CWinApp* pApp = AfxGetApp();
MSG msg; while(PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
pApp->PumpMessage();
}
But has anyone came up with a class to implement the CreateEvent() and WaitForSingleObject() .
Its justs to save time in generating by hand the thread and other code to managed these items.
Andy.
|
|
|
|
|
I don't see clearly what you are looking for. What you do when you need to wait for an event is simply call WaitForSingleObject once the event has been created (with CreateEvent). Then, in another thread, when something happen and you need to signal it to the other thread, just call SetEvent.
|
|
|
|
|
Cédric,
The routine CheckForEvent(); is in a loop waiting for a variable to be set.
while(!stop)
{
g_pMainDlg->ProcessMessages();
if(g_pSharedMem->A1_vuhf1_t02.fields.A1_t02_word_1_time_status == timecode)
{
stop = true;
g_pTabDialog->m_cErrorMessage.SetWindowText("Finished WAITING for time status");
}
Sleep(200);
}
Would it be easier just to kick off another thread to wait for the condition, just display a message that the condition has NOT occured in the main thread?
Andy.
|
|
|
|
|
hi All,
I have one windows service which works with "system account".
In this I am trying to access the mapped drive(shared on n/w by some server).
Now here I got errors like access denied. So I tried following cases.
case 1:
I changed the service to start as an administrator.
My mapped N/W drive has full access to everyone.
I have specified UNC paths
result: Things worked.
case 2:
I changed the service to start as administrator account.
My mapped N/W drive which needs password and username which are different.
Here I have specified the credentials while mapping that N/W drive.
I have specified UNC paths
result: I was unable to access the shared drive.
My question is as I am running as admin, my service is running as admin , I have mapped N/W drive as admin and supplied needed credentials at the mapping time.
why my service is not capable for acesssing that drive?
NOTE: I have an idea of null credentials but I don't want nullaccess enabled for N/W share. so dont want to use that option.
vikram S
|
|
|
|
|
Hi,
in the app i'm writing i need to collect data from various sources,every hour.I want the user to be capable of consulting these data through graphs,and most of all, to consult all the data acquired up to now.So i need to load all the data at every app start.
Now,i would like to ask you about a good way to store and quickly load data.I mean,i know i can store data in a text file,but i'm concerned about how long it will take to load this huge archive text file after some years....
|
|
|
|
|
|
This is the a good point,actually the one i was looking for,but i had no idea cause i have few experience of that and so i asked to more expert people.
Sorry about this following silly question,but as i told i'm a newbie in that:can a database solve my problems?
Thanks for the reply,by the way!
|
|
|
|
|
Accius wrote: can a database solve my problems?
yes.
their whole reason for existing is to store large amounts of data in ways that make it easy to access and update that data.
|
|
|
|
|
OK.
Just a last question:how about the time to load the database,when it has grown a lot?Will it be better than the simple text file loading?
|
|
|
|
|
to "load" the database ?
you access a database records through SQL requests...
if the database get too huge, you can indexate some table columns that are used often to query data
|
|
|
|
|
you should only load the data that you actually need, when you need it. if you need to read everything into memory, then a database won't help you.
databases help organize data so you can get the relevant parts of the data when you need them, quickly.
|
|
|
|
|
Ok,again i thank you.
You helped me a lot
|
|
|
|
|
By the way...
Can i add database support in a dialog based application i've already written?
Or have i got to make a new application?
|
|
|
|
|
Do you want to use of Sql Server or Access you said every hour does data voluminous?
|
|
|
|
|
WhiteSky wrote: Sql Server or Access
why don't you propose Oracle also in your list ? oh, yeah, MS Centric.
but know that Access is not a database
|
|
|
|
|
But why I must suggest Oracle I preference use of Sql Server(products of Misrosoft)
|
|
|
|