|
Depends what you're trying to do.
The conventional technique is to 'listen' on a common socket, when a client tries to communicate the 'accept' function returns the handle to a new socket that is used to hold the the conversation with that client. Thus a server can wait for a connection from multiple clients. But the conversation with each client is one-to-one on a dedicated socket.
Broadcasting or multi-casting to multiple clients is somewhat different.
|
|
|
|
|
What is the easiest way to connect to an Access DB from a ISO standard C module?
|
|
|
|
|
|
Hi,
I have a program that uses MFC. I made an install project for my program and I installed it on another computer.
When I tryed to run my program it said that it needed MFC70D.dll. After I copied this file in the program dir the error message said the program needed MSVCP70D.dll and after this it was MSVCR70.dll.
I added this files to the instalation program. But now when I try to install on the other computer there is an warning in the installation process:
"Module C:\...\MFC70D.DLL failed to register. HRESULT -2137024769. Contact your support personnel."
(Exit instalation / Try again / Continue) If I hit Continue all works fine.
Why is this? What is the proper way to also install this files needed by my program?
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Your installer is set to self-register MFC70D.DLL. It doesn't need to be registered, because it contains no COM classes, and hence it doesn't export the DllRegisterServer entry point.
You shouldn't be shipping a debug version of MFC with your software. Build a Release version of your software, then ship MFC70.DLL, MSVCP70.DLL and MSVCR70.DLL.
If you're using a Windows Installer-derived installation product, use the merge modules supplied with Visual Studio .NET. You need VC_MFC.MSM (MFC70.DLL and MFC70U.DLL), VC_CRT.MSM (MSVCR70.DLL) and VC_STL.MSM (MSVCP70.DLL), which are installed to C:\Program Files\Common Files\Merge Modules. If the tool has an option to check MSMs for DLLs added to an installation, enable the option and point it to this directory.
|
|
|
|
|
i have a main dialog containing 3 child dialogs. I created a COpenglclass in main dialog such that any image visualization will take place in the main dialog. But i do not know how to detect that if any child dialogs are accessed only then will my drawing code in the COpengl class take in data from the child dialog and show the relevant image. need help on this urgently
|
|
|
|
|
Is it possible just to use the child's msg when it receives focus or something along those lines and then react and do whatever you want.
|
|
|
|
|
thanx for replying. i am considering alternative or setting state flags but i not sure how to code that in child dialog and view class's Onpaint().can you illustrate?
|
|
|
|
|
Apparently I am missing the appropriate reference material to solve this problem and my attempts to google an answer has been an exercise in frustration. It doesn't help that there seems to be no strict consensious on if seperate output channels are 'channels', 'voices' or some other thing I can't think of. The only reference I have found is a link to a dll that allows you to use up to 8, but there is no source for the dll itself or explaination of how it works...
Basically, a friend of mine has a program that uses C++ with MFC and currently everytime an event happens in it and a sound is played, it halts whatever previous sound was playing and starts the new one. Now games don't do this and other programs seem to be able to play a wav/mp3, etc. without interrupting something already active. I need to know how to:
a) find out how many real voices/channels are available.
b) figure out which ones are not in use.
c) replay the next sound on an unused channel, instead of interrupting something that may not be finished playing.
I haven't a clue how to do any of this, nor a sufficiently decent explaination of how you can do this, despite most cards now having anything from 8 to 96 seperate outputs for overlapping sound. Most simply ignore this issue in favor of the 'Here is how to play one sound, good luck trying to play more' type of examples. It is quite frustrating and I am now at the point where I don't even know where to continue looking.
As a preference, I would prefer an option that doesn't necessarilly depend on DirectSound or the like, which may in some rare cases not exist on a computer that is normally still able to run the program this feature is to be included in. Please help!! :.(
|
|
|
|
|
|
Hmm.. While your link was more or less the same junk as other pages. A search on "waveOutOpen" and "multiple wav" produced this: http://www.pocketpcdn.com/articles/multiplewaves.html
I swear that Google is bloody brain damaged. I would have thought given the title of the article that my original search of "play wave muliple simultan" would have at least produced this in the top 30 or so links, instead I slogged through 10 or more pages of useless junk and never found it. Thanks for pointing me in the right direction, even if the solution turned out to make no bloody sense from the perspective of common sense. If a card has 96 possible voices, then the API should be able to tell you that. Apparently instead it worls like this (from a brief review of the code):
Is there a output device?
Yes - Is it available?
Yes - Who cares, send the sound file anyway.
Driver/Card - Oops.. Someone needs me to play a
new sound, Voice 16 is free, lets put it there...
Apparently I am the only person that has issues with the logic of this design... lol I guess if the card runs out of available channels it comes back as "Unavailable", but otherwise continues to accept new sounds until it runs out. God forbid something crashes and doesn't release the voice being used. Though come to think of it I have seen this happen a few times and getting the damn card to shut up when it does is inconvenient at the least.
|
|
|
|
|
As long as it works, why should we worry?
Kagehi wrote:
Is there a output device?
Yes - Is it available?
Yes - Who cares, send the sound file anyway.
Driver/Card - Oops.. Someone needs me to play a
new sound, Voice 16 is free, lets put it there...
Yep, that's basically the process, as I understood it. At least, we don't have to care about the managment of the channels, even if we aren't able to predict how many are available.
A quoi rêvent les personnes qui nous font vivre ce monde ?
|
|
|
|
|
Because in certain cases it doesn't. The Dink Smallwood engine for instance, at least on my computer, will if I turn on sound occasionally 'lock' one of the sound channels in an endless loop. I am not sure if this is a stability issue, do to memory issues caused by my badly in need of replacing AGP card, or some issue with the engine, but short of shutting down the game (which releases all the channels), it doesn't go away. The articles I have seen appear to indicate that you can be 'sort of' sure that a sound has at least been sent to the card, but not if it is playing or anything else useful. This means that if something locks up a sound channel, which gets stuck looping the sound and for some reason the card never gets told it is supposed to release it, then nothing short of a reboot of the machine will stop it.
This is like a lot of things with that seems to have MS' fingerprints on it. I could care less how well it works when everything goes right, I want to be able to control and correct problems when something inevitably goes wrong. In this case two things can go wrong, right of the top of my head. 1) a channel can get locked and looped, and since you can't reset the card, you have to reboot instead. 2) You can't even verify how many sounds are possible, so you are forced to either keep a list of every model of every card, so the game knows what the card can do, or design conservatively based on the bare minimum you can reasonably expect to have available. The first option is bloat that provides nothing to the game engine and the second option just flat out sucks.
It's like if they designed a new hard drive that you could continue to add more and more stuff too, but didn't let you check how much space your files had already taken up. Suddenly 'wham!' you are out of space and wondering what moron thought it was a good idea. lol
Anyway... Enough ranting. lol
|
|
|
|
|
I use these methods not in a game but in a sound editor. For the moment, I never have had any problem of channel deadlocked, but I don't use the sound card as extensively as a game could do. However, I believe (just a belief, not a demonstrated fact) that if an application handles correctly sound restitution, there should be no reason to have this problem. A repetitve sound play could come either from the application sending data in a non-ending loop or from a problem directly connected to the sound card.
Excellent ranting anyway
A quoi rêvent les personnes qui nous font vivre ce monde ?
|
|
|
|
|
Hi all. I am considering writing an article(s) on the NTFS and FAT file systems. No it is not a general file system theory article. I am thinking about writing something that will offer information and code for doing direct disk reads and writes with information on the file system structure for people who would like to try writing defrag programs, etc. However, before I do this, I want to make sure there is interest out there for such an article. If you would find such an article interesting please reply and let me know and if enough are interested I will create one (most likely a separate one for each FS type ie: ext2/ext3, FAT, FAT32, NTFS, UDF, CDFS, etc. )
|
|
|
|
|
Interested! Please submit an article.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
You got my 5!
I Dream of Absolute Zero
|
|
|
|
|
Just another client of yours.
I would be glad to read some good stuff about the secrets of NTFS.
Peter Molnar
|
|
|
|
|
|
Yeah i would love to read article on NTFS, but let me clarify a bit. NTFS is not that well documented like microsoft did for fat system. Its very difficult to write 100% compatible NTFS logic.Thats what my understanding is about NTFS.
My God is more powerfull Than Your God.
|
|
|
|
|
Adam Gritt wrote:
I want to make sure there is interest out there
Yes please!
And while you are writing about ext2/ex3 - please also consider reiserFS!
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Looks like there is enough interest so I will do it. Don't expect it right away, it will take me a month or so to compile all my information into one document but I will do it.
|
|
|
|
|
Hi, i'm very interessed also
I would like to know the physical starting position of file on the disk and in priority for the CDFS and NTFS to make a "fast" multiple file copy function. The idea is to sort files to be copied in the physical arragement of media support.
Cheers
Patrick Bricout
|
|
|
|
|
I'm looking to write some code that will convert between 3 different file formats. I'm thinking of coding something really generic such that it's easy to add new formats. However, before I do a lot of work designing and writing this, I wanted to see if anyone here knows of a design pattern or set of classes that already provides this capability.
Cheers,
Tom Archer
Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic.
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|
|
Have you read 'Design Patterns' ? I would have thought any of the factory type patterns would be candidates, depending on how complex the conversion is. Obviously what you want to end up with is a format where you have a class that handles the conversions and you can just keep writing 'plug in' classes for any file formats that may come up.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|