|
Hi Chris,
Thanks for your reaction, even though you where a bit...
The first 3 Milestones won't be a big problem, only a bit of a sweat. I know a lot about SQL, so I would prefer to use that.
4 and 5 will be a lot of learning I guess, but that's no problem(I hope). Thanks again, also for the links, very useful!
Jesper
PS. Have a beer on me.
|
|
|
|
|
Jesper,
The database options I was suggesting were intended to contrast using a standardized API vs using a RDBMS lib API directly. I'm guessing we are arguing semantics here but SQL is the data manipulation language and not an API used to connect/control a database. So when you say you want to use SQL I/we think "what other rational choice is there", the question we would ask is "what API am i going to use to connect to a database ?" e.g. ODBC, OLE DB, ADO, through which SQL commands are passed to manipulate the database.
The networking will likely be the biggest learning curve - depending on what model you use for your server. I would really suggest IOCP, just because you can create a set of base class' now that you can use in all future server projects. IOCP allows the most scalable server model (currently available on Win) to be developed. However, it does require mutlithreaded development which opens its own can of worms.
The service stuff is cake. Shouldn't take more than a day or two to get upto speed and convert the console server app over to a service.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Okay,
I found a few examples;
http://www.codetools.com/internet/chatclient.asp?target=iocp
http://www.codetools.com/internet/chatserver.asp?target=iocp
Also a couple of other ones which I can use to learn a few things.
The DB-scheme is finished, more or less. Still got some types where I don't know for sure what the best length will be to use. But I guess that's because my sign is scales . (made a lot of php-sites with MySQL and I always seem to have this problem!) Btw. php is easy compared to this!
The client/GUI-part is ready to go to work, only have to implement a few things, but that won't be the problem.
ADO will be the way to access the DB, found a lot of App's that where similar and using this.
Hard work, but I like it .
Thx 4 your help so far, really appreciate it!
Jesper.
|
|
|
|
|
lJesper wrote:
Thx 4 your help so far, really appreciate it!
Sounds good.
I'm travelling right now (in Toronto at the moment).
But i'll be checking in for the next week or so that i'm here.
Feel free to ask questions.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I am wondering how to find where a certain program is loaded into memory so I can access that section of RAM and read/change/ect the data.
I do not know how to find where that program loaded itself into memory. I also don't really know how to access/change the data but I assume I can just create a pointer and move it along from the start of the memory block and figure it out from there. Which also reminds me, how can I tell the end of the memory location as well.
So I guess I need to know how to find the block(start/end) of memory that a program has loaded itself into.
I am just looking for links that show me how or explain it. But source code is always nice as well.
Thanks
|
|
|
|
|
It's the operating system who load the program to memory, not program itself. You can appoint a base address when you compile a program. System try to load program on that address, if failed, it load program by it's own rule.Access other process's memory also has it's own rule. I suggest you read about the book <<programming applications="" for="" microsoft="" windows="" fourth="" edition="">> by Jeffrey Richter.I thought there you can find the answer you want.
Thinking in difference!
|
|
|
|
|
Thanks. I do know that the OS tries to place the program first then to the program. I am just wondering if the WINAPI or something in C++ allowed for finding where a program was loaded. For example, I want to find out where Minesweeper is loaded into memory so I can try to read its memory block and figure out what tiles are bombs. That is what I am aiming to do. I will try to find that book and see if it can yeild what I am looking for... given I am not exactly sure what the code will be that I want.
Thanks again.
|
|
|
|
|
There's an MSDN article titled "Minimizing the Memory Footprint of Your Windows CE-based Program" by Douglas Boling that might give you some clues. See the "An Application's Address Space " section. I did not look to see what API was used.
|
|
|
|
|
I still cant get this frickn' CTreeCtrl to insert a line...
m_cSlidOpen->m_ctrlXMLTree.InsertItem(m_strSectionName);
Where as m_cSlidOpen is the class varible to the class that contains the tree control, m_ctrlXMLTree, (this is because the current class is doing all the parsing), my program crashes when ever it gets to this... m_strSectionName is a valid CString.
How do I fix this.. i've tried adding in TVI_ROOT and it still does this
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
Did you try something like this?
TV_INSERTSTRUCT tv_is;<br />
<br />
tv_is.hParent = TVI_ROOT;<br />
tv_is.hInsertAfter = TVI_LAST ;<br />
tv_is.item.mask = TVIF_TEXT;<br />
tv_is.item.pszText = m_strSectionName.GetBuffer(1);<br />
tv_is.item.cchTextMax = m_strSectionName.GetLength();<br />
<br />
HTREEITEM hItem = m_ctrlXMLTree.InsertItem(&tv_is);
Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Dwight D. Eisenhower
|
|
|
|
|
Thank you it stop it from crashing.
I tired that but now its not updating the tree control even after a UpdateData(FALSE);
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
Hi friends,
How can i handle hardware interrupts in win2k?
|
|
|
|
|
Greetings
I have a command line tool and I want to provide a GUI interface to schedule the tool to perform its job. Now the problem is how do you I invoke the Query Interface wizard thru API? I can create a test sample job using the following code but I am unable to start the wizard so that the user can set it times directly thru my app.
Thanks in advance.
ITaskScheduler * sITS;
HRESULT InitTSAPI()
{
HRESULT hr = S_OK;
_ASSERTE ( SUCCEEDED(CoInitialize(NULL)) ); // init COM
if (SUCCEEDED(hr)) {
hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void **) &sITS);
if (FAILED(hr)) {
return hr;
CoUninitialize();
}
}
return hr;
}
HRESULT CreateTask ( WCHAR * pTaskName )
{
HRESULT hr = S_OK;
ITask * task = 0;
IPersistFile * pFile = 0;
hr = sITS->NewWorkItem( pTaskName, CLSID_CTask, IID_ITask, (IUnknown**)&task );
if ( FAILED ( hr ))
return hr;
hr = task->QueryInterface(IID_IPersistFile, (void **)&pFile);
task->Release();
hr = pFile->Save ( NULL, TRUE);
_ASSERTE ( SUCCEEDED ( hr ));
pFile->Release();
return S_OK;
}
void main()
{
InitTSAPI();
CreateTask(L"Test Task");
sITS->Release();
}
|
|
|
|
|
Hi all
I know that in win32 access to GUI objects from another thread is a bad thing. I can't understand why...
If, for instance if have an edit box created in the main thread A
and I try to this from thread B:
EditBox.GetWindowText(...);
what can be wrong here?
the GetWindowText will send WM_GETTEXT message to the window in thread A
and thread and A will dispatch it and call control's WinProc, isn't it?
|
|
|
|
|
It's only bad in MFC, because of how MFC keeps track of the associations between C++ objects and GDI handles. If you do anything more complicated than sending a message, MFC will assert all over the place.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Ericahist updated Aug 30!
|
|
|
|
|
Can you add some more info about this?
thanks?
|
|
|
|
|
Hi!
I think WM_GETTEXT should solve your problem
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowMessages/WM_GETTEXT.asp
Use SendMessage
mfg
|
|
|
|
|
Sending messages can result in a deadlock situation. Read more about this from http://www.flounder.com/uithreads.htm and http://www.flounder.com/workerthreads.htm.
|
|
|
|
|
Because of the potential for deadlock situations.
Thread 1 creates Window 1
Thread 2 creates Window 2
Thread 1 calls Function 1 that eventually calls GetWindowText(Window2) which causes a blocking SendMessage() call.
at the same time ...
Thread 2 calls Function 2 that eventually calls GetWindowText(Window1) ...
(of course it could be anything that generates a SendMessage() or causes the thread to block)
So :
- Thread 1 enters Function 1
- Thread 2 enters Function 2 everything is cool
- Function 1 calls SendMessage(Window1) which blocks becuase Thread 2 isn't pumping messages as it is in Function 2
- Function 2 calls SendMessage(Window2) which blocks becuase Thread 1 isn't pumping messages as it is waiting on SendMessage(Window1)
It's very easy for the above to occur without carefull thought to window/thread interaction - that's why it's a bad thing.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello,
It's probably a stupid question but how do you create a binary file with CreateFile? But the file must be scrambled so when you open it (in notepad for instance) you can't read (or manipulate) the data.
Thanks in advance,
Tom
|
|
|
|
|
Encrypt and sign the file.
The topic of encryption and cryptographic signatures is a bit big for me to explain in a couple of lines of text so look around for some tutorials on the net... Good luck!
|
|
|
|
|
I am looking for imformation that someone without a PHD in math can use to implement a spectrum analyzer in C++. I am trying to use the Fast Fourier Transform to create a spectrum analyzer. I cannot seem to find any info that I can understand.
What I know is that there are many FFT implementations out there but do you apply it to my problem?
I want to use a samplng rate of 44100 Hz and or 48000 Hz.
I believe I should use a 1024 samples
I believe I want a spacing of 100 Hz
I just need some direction.
Thanks,
Steve
|
|
|
|
|
OK, here's the basic facts. There's a well known signal theory theorem stating that the most signifcant frequency computed by an FFT is half the sampling rate (google for Nyquist frequency for further info). Assuming that you're sampling at 48 kHz, that means that the maximum frequency obtained after FFT is 24 kHz. We denote this maximum frequency as fs. Now, suppose you compute the transform in 1024-sample chunks. Then the output of the FFT routine is a 1024-point chunk of frequency components in the range [-fs, fs). The spacing between frequency points is thus 2fs/1024 = 46.875 Hz. Considering that you want 100 Hz precision, you'd only actually need 512-sample chunks (giving 93.75 Hz resolution).
Additional issues to keep in mind:
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Beware
in many cases the fft return complex numbers.
|
|
|
|
|
you basically need to take the magnitude of the fft,,
try matlab, its very easy
you just need a series of number, and then type
y=fft(funcation, );
and then,, take the absolute value of it
x= abs(y);
take an introductory signal analysis book,, its very easy
done
Ehsan Behboudi
|
|
|
|