Click here to Skip to main content
14,829,679 members

Comments by Code-o-mat (Top 169 by date)

Code-o-mat 23-Jun-14 4:56am View
By "lock", you mean the user selects "Lock" from the menu where you can also select "Shut down", "Logout", etc, right? Assuming that you are working under Windows OS that is.
Code-o-mat 19-Jun-14 11:00am View
ACtually i could never stand Vi...
Code-o-mat 19-Jun-14 10:37am View
Code-o-mat 18-Jun-14 10:49am View
Which part of the task you described here do you have a problem with?
Code-o-mat 3-Jun-14 4:42am View
5 points for solving your problem and letting us know. Thanks. :)
Code-o-mat 30-May-14 5:51am View
What do you mean by "without using a temp string"? Give an example possibly...
Code-o-mat 29-May-14 4:49am View
What do you mean by "i searched for direct show but couldn't find it"? It's there: but i supose that's not what you meant because that would be way too obvious. Do you mean you couldn't find a way to use it to capture video off the screen?
Code-o-mat 16-May-14 12:16pm View
Did you try adding the TVS_SINGLEEXPAND (see here: style to your tree control? In case you try it, note that according to the documentation linked above, it will still allow the user to have multiple items expanded by using the Control key.
Code-o-mat 16-May-14 12:08pm View
As Sergey pointed out, it's really not clear what you want to do. If you want to write the item strings you see in a listbox to a file then look up in google how you can access item strings in your listbox (e.g. start here:, write a simple loop that iterates the items and writes them to a file. If you don't know how to write to a file or can't figure out how to iterate the items, you need to make a step or two backwards and learn the basics before trying something more complex. We here are willing to help you but you need to ask the right questions to get useful answers, otherwise we won't be able to aid you.
Code-o-mat 16-May-14 8:04am View
You sure your process' bitness and the DLL's bitness is the same? I believe e.g. if you try to load a 64 bit dll into a 32 bit process you will get "file not found" (i had to find this out the hard way myself). I might be remembering wrong though...
Code-o-mat 16-May-14 8:00am View
Do you mean you have a memory dump created with MiniDumpWriteDump as suggested to you in your other, earlier post where you asked how you could dump all process memory?
Code-o-mat 15-May-14 16:11pm View
No idea if this will be any useful to you or not, but once we ran into a crazy, seemingly unexplainable connection-failure when trying to connect to an oracle database. After a lot of headbanging and googling we found out that the problem was that our 32 bit software was installed on a 64 bit system and thus it was under c:\program files (x86)\... and for some reason the path of the executable is used by oracle when establishing a connection BUT if the path contains parentheses it gets rejected.

There's no indication whatsoever if this could be your problem, i just thought i share it just in case...maybe one day someone reading your post will read this too and it will be just what was needed.
Code-o-mat 14-May-14 3:54am View
Googled around a bit and found this:
I know it's VB but might be worth a try in C++ too in case you haven't run across it yet.
Code-o-mat 13-May-14 16:22pm View
Are you sure you are using whatever you are using correctly?
Code-o-mat 13-May-14 12:03pm View
First, if you want to send a comment for a solution, use the button under it labeled "Have a Question or Comment?", don't send it as another solution.

Second, you can check the last error code (e.g. by using GetLastError()) to see what might have went wrong.

Third, if you are not after exception information, then just specify NULL where you now specified &eInfo.

Fourth, if you want the heap included in your dump, try using MiniDumpWithFullMemory instead of MiniDumpNormal.
Code-o-mat 13-May-14 11:50am View
Your code doesn't seem to call itself (no recursion) and also doesn't allocate anything huge on the stack as far as i can tell, how would it directly cause a stack overflow? (Btw if you feed it with "raw_data" that consists of only one separator character and nothing else, it crashes, no idea if this would or would not be a problem in your case)
Code-o-mat 13-May-14 11:06am View
Let's assume you don't get the dialog displayed, then what? Just trying to understand what your goal is.
Code-o-mat 1-Nov-13 6:59am View
Did you try saving the gif image you received from your server to a file and then comparing it (e.g. witjh a diff program) to the original to see if they are the same or not? Are you completely sure the gif images are not corrput on the server's machine itself?
Code-o-mat 1-Nov-13 6:54am View
Does this need to work inside your own application only or do you need this functionality also when the user clicks outside of your application, e.g. onto another application's window or the task bar or whatever?
Code-o-mat 1-Nov-13 6:46am View
I never worked with MS' DataGridView so what i am saying here is purely "out of the air", but, couldn't you try to inject a DLL (if you don't know what this means, just search for "DLL injection" here on CodeProject or on Google), find the data-grid by handle or class-name or some other way and then send messages to it to query data from cells (as said, i am not familiar with this control so i don't know if this would be possible) and then return this data to your other process thorough a socket or pipe or whichever inter-process communication you might prefer?
Code-o-mat 9-Feb-13 8:03am View
Just asking: if you remove an item, shouldn't you be ending up with one less item rather than it getting replaced with the last item? This way, if you keep removing items you'll get an array full of the last value AND you can't remove the very last item no matter what. Did your assignment or task or whatever explicitly state this is what you need to do?
Code-o-mat 29-Jan-13 9:53am View
I got that, but it isn't completely clear to me what your actual problem is. The "behaviour" of LPCTSTR is quite simple really, depending on your project settings (project properties -> Configuration Properties -> General -> Character Set)

it is:
const char * if you are using MBCS (or select "not set")

it is:
const wchar_t * if you are using the unicode character set

If you mean that you write your junk to a file in one project and read it in another project and you don't get the same characters back after reading (and you are completely sure the actual writing/reading is done correctly) then my best bet would be that your two projects use different character set configurations. Could this be your problem?
Code-o-mat 29-Jan-13 9:32am View
You open the file with:, std::ios::in|std::ios::binary);

and then write your buffer to it? As far as i know std::ios::in means you are opening the file for input, that is, reading, not writing.
Code-o-mat 9-Aug-12 4:09am View
No problem, it appebs.
Code-o-mat 7-Aug-12 4:19am View
As said, try studying DiectShow, it's kinda like...there for such reasons.
Code-o-mat 6-Aug-12 9:52am View
What is the question? "Any ideas?" doesn't really describe the problem you are facing with this project.
Code-o-mat 6-Aug-12 3:39am View
Are you talking about this: ? What does errno give you after the call (try to look up the error instead of giving us a number, please)?
Code-o-mat 6-Aug-12 3:35am View
Wouldn't that work only "inside the process" whose outputs you want to redirect? I presume the command line program isn't written by him and he does not have the sources so he can't insert reopen in it.
Code-o-mat 26-Jul-12 4:54am View
Can you show us what that thread does? You could use the "improve question" link under your post to add some relevant code sniplets, don't forget to tag them accordingly.
Code-o-mat 24-Jul-12 9:20am View
How about the function inet_ntoa ( )? You can also see it being used in the examples shown to you by Volynsky Alex (Solution 2).
Code-o-mat 22-Jul-12 5:55am View
Code-o-mat 22-Jul-12 5:55am View
Then I still say what I originally wrote should work.
Code-o-mat 22-Jul-12 5:43am View
Not sure if this might help anything, but shouldn't you specify PF_INET for the third parameter of the socket call (where you have zero now)? Otherwise, this might be a synchronization-kind of problem, like, you do the bind call and then right after you do the netstat call, maybe the system didn't have time yet to completely register your socket as bound? Or maybe your socket will be only listed if you also call 'accept'?
Code-o-mat 19-Jul-12 14:28pm View like going to a peep-show blindfolded. You can do it but why the hell would you? :D
Code-o-mat 17-Jul-12 8:21am View
Not completely sure what the actual question is. Printing the numbers in hexadecimal is all you want?
Code-o-mat 6-Jul-12 4:42am View
Maybe the question is encoded in Base64 and we are suposed to decode it to know what it is...
Code-o-mat 4-Jul-12 9:35am View
Code-o-mat 3-Jul-12 15:39pm View
Wouldn't your method fail if your monitored application's window is overlapped by some other window, minimized or hidden some way, like dragged off screen or somesuch?
Code-o-mat 3-Jul-12 14:28pm View
What happens if you just do a Sleep(INFINITE); after using Advise once (so not in a loop)?
Code-o-mat 2-Jul-12 6:30am View
Where do you get that exception?
Code-o-mat 27-Jun-12 8:50am View
What part of it do you not understand? If all we know is that you want to know what PostMessage is, i doubt we can give you a better answer than any documentation, like MSDN can.
Code-o-mat 20-Jun-12 8:25am View
Not sure if this helps you or not, but e.g. the IRC (Internet Relay Chat) protocol does exactly that, you can probably find open-source IRC servers around the net, you could try finding a lightweight one and examine it.
Code-o-mat 18-Jun-12 5:39am View
Well, a bit hard to guess from that much information, but i supose your added 2 bytes isn't part of the audio stream, so you should not try to play them on the receiver side. Remove them/skip them or something.
Code-o-mat 10-Jun-12 6:38am View
I'm not into driver development, but in user space you would probably use VirtualProtect(Ex) ( ) to achieve this task. You could try finding the corresponding kernel methods for that.
Code-o-mat 30-May-12 10:12am View
There seems to be an option to restore the default gadgets that originally came with Windows in case a user had removed any of them. Do you mean this? You want windows to restore your gadget when the user selects this option?
Code-o-mat 27-May-12 4:21am View
My 5 also, completely agree with nv3.
Code-o-mat 24-May-12 4:41am View
your question is a bit vague, give some more details about what you want to do, otherwise we can only try and guess...
Code-o-mat 21-May-12 15:40pm View
You mean you have a string representation of the byte values or you have the byte values themselfs, so basicly, you have an utf16 string and you want to convert that to ASCII or somesuch?
Code-o-mat 19-May-12 14:34pm View
I don't understand what you mean, sorry.
Code-o-mat 19-May-12 8:51am View
Another hint in there is this:
normal block at 0x00D9ECB8, 12 bytes long. Data: < ' > C7 A8 C7 A8 27 06 00 00 01 00 CD CD f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\occcont.cpp(923)

I checked occcont.cpp:923, it contains this:
new COleControlSiteOrWnd(hwndCtrl,
This is in the method:
BOOL COleControlContainer::FillListSitesOrWnds(_AFX_OCC_DIALOG_INFO* pOccDlgInfo)

Any clue where you might be -directly or indirectly- use that?
Code-o-mat 19-May-12 8:45am View
See the characters between the < and > after "Data:" in the memory leak reports? Those are the first few bytes of memory that wasn't freed. I see things like 0,1,2,3...A,B,C...a,b,c... in there, one character, one leak...doesn't that maybe give you a hint where these might get allocated Kinda looks like somesort of ascii-table or somesuch?
Code-o-mat 19-May-12 4:33am View
My guess -without seeing the code- is then that your message handler might be wrong or misplaced. You say other shortcut keys work fine, are they handled the very same way as this one and at the very same message map as this one?
Code-o-mat 18-May-12 10:22am View
If you assign that same ID to another key combination, like Ctrl+D or somesuch, does it work then?
Code-o-mat 18-May-12 10:16am View
Well, maybe he downloaded it after paying for it online or something... but you are right, that's not likely...
Code-o-mat 18-May-12 10:05am View
Thanks, i think... :)
Code-o-mat 18-May-12 10:02am View
Does having the focus placed on different controls change anything? E.g. if you have a button, an edit, a checkbox, if you put the focus on the button and hit your hot key, then to the edit, then to the checbox...does it make any difference?
Code-o-mat 18-May-12 9:06am View
I believe you are at the wrong forum/message board here, this site is for software developpers, programmers...i suggest visiting the game publisher's site or game-related forums. Good luck with solving your problem.
Code-o-mat 18-May-12 5:30am View
I'd say, google for the keywords: "hello world windows application C++", it should bring up some useful/interesting hits.
Code-o-mat 17-May-12 14:34pm View
Code-o-mat 17-May-12 14:21pm View
As far as i know texturing with wireframe rendering isn't supported by all video cards, maybe that's your problem...
Code-o-mat 17-May-12 12:42pm View
Well, GDI+ wasn't built for speed, as far as i know, so i am not surprised it isn't "speedy" as you said. I think in your situation the best bet would be to access the bitmap's pixels directly. You could do this e.g. by adding LR_CREATEDIBSECTION to your LoadImage, after this your BITMAP structure's bmBits member -after you use GetObject- should point at the pixel data. Doing it this way is a bit complicated, try searching in Google or Code Project for related topics.
Code-o-mat 17-May-12 9:14am View
Without knowing at what line the exception is occuring, it will take one helpful programmer with a very keen eye to spot the problem. You should try post-mortem debugging your code, just google for this expression for details.
Code-o-mat 17-May-12 3:43am View
Code-o-mat 16-May-12 10:45am View
Not enough information...try providing some more details about what you are doing, preferably show some relevant code sniplets, otherwise people will have a hard time trying to guess what you mean, if they will try at all...
Code-o-mat 15-May-12 12:15pm View
In what environment? Windows?
Code-o-mat 15-May-12 7:31am View
Nope, sorry, never used it, i just remembered it exists. I will add this as a solution so others can easily find it.
Code-o-mat 15-May-12 7:14am View
Check out Windows TAPI ( ), could that help you?
Code-o-mat 15-May-12 6:35am View
Just a suggestion: you might try downloading Float's mobile agent ( ), the sources are -i believe- available, if you are good at programming as you said, you could try studying it to see how it works. It's written in borland Delphi though...
Code-o-mat 14-May-12 12:40pm View
Yourwelcome and good luck.
Code-o-mat 14-May-12 12:23pm View
I modified the solution and added some code, please see above.
Code-o-mat 14-May-12 6:26am View
Welcome to Code Project then, and good luck with your project.
Code-o-mat 13-May-12 16:44pm View
Good catch, i could have sworn i saw that "DriveInfo *FoundDrive = new DriveInfo;" inside the while loop...5 points for not missing the obvious like i did. :)
Code-o-mat 13-May-12 16:40pm View
Pelase note that this way you are leaking some memory, the last instance of DriveInfo that gets allocated is never deleted. Even, if one of your if conditions yield false, or your while loop doesn't go through any iterations, the very first instance of DriveInfo will not be deleted. You also don't seem to delete WMIReader either. (I assume you free up the DriveInfo instances that you pushed into the vector at some place...)
Code-o-mat 11-May-12 6:58am View
Do you use some library to work with png files that requires a DLL maybe? If yes, does your installer include this DLL?
Code-o-mat 10-May-12 14:33pm View
I usually spot these early on, but yeah, it happened a few times...
Code-o-mat 10-May-12 14:15pm View
This reminds me of the time long long time ago when i was "headbanging" over a for loop that would only execute once no matter what i tried and i couldn't understand how that was possible, checked all the variables, instructions, increments, everything looked ok but still it wouldn't work. Then i realized there was a damned semicolon at the end of the loop. So something like this, of course the loop i am talking about was a bit...more complex:
int i;
for (i = 0; i < 10; i++);
printf("%d\n", i);
Code-o-mat 10-May-12 13:56pm View
eh, you are right, i have no idea how i mixed that up...will delete my comment to remove the confusement. :) Sorry...
Code-o-mat 10-May-12 12:14pm View
Just to split some hairs, it eventually would stop printing when 'n' wraps around... :)
Code-o-mat 10-May-12 12:06pm View
As already said, your question is hard to understand. Anyways, please note that in the code segment you are not increasing the variable 'n' inside of the 'for' loop, since 'n++' isn't in the body of the loop but after it.
for (;n<5;)
should work better.
Code-o-mat 10-May-12 6:07am View
How does it "not work"? It does not compile? It does not get linked? It does not play the sound? It crashes?
Code-o-mat 9-May-12 14:14pm View
Even though i am a C++ "fan", here's a 5 for your answer. :) (Btw I agree somewhat, in some things C++ is indeed a bit...old style)
Code-o-mat 9-May-12 14:10pm View
Thanks for your vote. What the "best" way is is really a question of personal taste. I avoided that form of initialization for the sake of clarity, since "x = 10" is pretty obvious, but "x(10)" might look confusing at first. I heard that at some places they even discourage you from using this form for initialization with simple types because at the first look it suggests that you are constructing some more complex object and it makes your code harder to decyphwer when others look at it. Nevertheless, i should have mentioned it at least.
Code-o-mat 9-May-12 13:10pm View
Then i guess, as Schehaider_Aymen also said, there's no such thing in C++ that i know of.
Code-o-mat 9-May-12 11:12am View
I guess you would need to write a "Rendering Plug-In", (see here: ) which doesn't render but instead streams information through a socket.
By the way, if you want to react on someone's comment, use the "reply" link that appears in the top-right corner of the comments, if you want to react on a solution, click on the "Have a question or comment" link at the bottom-left part of the solution's box. This will send a notification to the person who wrote the comment/solution, otherwise they might not notice that you are "talking to them" by improving your own question.
Code-o-mat 8-May-12 10:35am View
Code-o-mat 8-May-12 10:28am View
You misunderstand. This:
str1.Format("%%1.%dlf", 5);
will give you:
In this context the "lf" after the %d isn't parsed, it's simply output to the generated string as normal text.
Code-o-mat 8-May-12 10:20am View
That stands for "long double", check here:
Code-o-mat 8-May-12 10:10am View
Thanks. :)
Code-o-mat 7-May-12 15:43pm View
Doesn't that work? I mean what you wrote there with "char *tpo =..."?
Code-o-mat 7-May-12 15:43pm View
Doesn't that work? I mean what you wrote there with "char *tpo =..."?
Code-o-mat 7-May-12 14:21pm View
This question i don't understand, sorry.
Code-o-mat 7-May-12 14:20pm View
Staying by the example above, a function could look like this:

void AFunction(TApple &x)
x[1][2][3] = 10;

and you would call it like this:
Code-o-mat 7-May-12 14:13pm View
Wouldn't simply trying to connect them work? If they can connect, they will, if they can't, they won't, right?
Code-o-mat 6-May-12 6:05am View
Are you sure you wanted to add that comment as a "solution"? Anyways, wouldn't something like this: work for you?
Code-o-mat 6-May-12 4:06am View
Well, i won't go into trying to decypher your code and rewrite it, but here's one general way of doing it:

Instead of this:
int apple[2][3][4];
apple[1][2][3] = 10;

you can do e.g. this:
int *papple = new int[2 * 3 * 4];
typedef int TApple[2][3][4];
TApple &dapple = *(TApple *)papple;
dapple[1][2][3] = 10;
delete []papple; //don't forget to delete the dynamically allocated stuff
//when you are done with it

You could easily write a macro to reduce code size and the amount of typing to do it.
Code-o-mat 6-May-12 3:43am View
Shouldn't you be using LPWIN32_FIND_DATAW instead of LPWIN32_FIND_DATA in the parameter list of your myFindNextFileW method? Since it's just a pointer which you don't seem to use for anything other then passing it along it probably wouldn't make no difference, but still...
Anyways, if you are using Visual Studio, then you can attach the debugger to cmd.exe and place a breakpoint in your method and step trough the code. You'd do this by loading your DLL's project, performing the injection and hooking as you'd do, and then in the "Debug" menu you can select "Attach to process", find the hooked process, select it, place a breakpoint in your method and then e.g. type that "dir" in the console window.
Code-o-mat 5-May-12 17:47pm View
Why not allocate those huge buffers dynamically?
Code-o-mat 5-May-12 16:57pm View
Can you tell me why you need the category?
Code-o-mat 5-May-12 16:34pm View
By external IP i mean the IP you get from your ISP. The port is fine if nothing else tries to use the same.
Code-o-mat 5-May-12 15:39pm View
Another thing, your question says "can't connect on different networks", if your two computers are on different subnets -if that should be the case- then they won't be able to connect. Am no network expert but i think you either need to use an "external IP" for that or somekinf of tunneling/bridging.
Code-o-mat 5-May-12 15:36pm View
If you check that code out here:
you can see this:

10061 (0x274D)
No connection could be made because the target machine actively refused it.

So i'd say, you have some firewall disallowing the connection.
Code-o-mat 5-May-12 15:17pm View
Yourwelcome. :)
Code-o-mat 5-May-12 14:51pm View
You said you get "Error initializing socket", so this means, this code runs:

printf("Error initializing socket %d\n",WSAGetLastError());

See the call to WSAGetLastError() in there? I'm talking about what that returns. What's the number you get after the text "Error initializing socket"?
Code-o-mat 5-May-12 14:35pm View
Might help if you also tell us what the last error code was.
Code-o-mat 5-May-12 10:27am View
And another high-five from me. :)
Code-o-mat 5-May-12 9:50am View
If you don't use the 'Reply' link (see the top-right corner of the comments) but rahter hit the 'Have a Question or Comment' thing below then i get no email notification about the event and won't know about it.
Code-o-mat 5-May-12 9:48am View
Are you sure the actual hooking is successful? There can be multiple reasons why your hooked method doesn't get invoked. E.g. explorer could use LoadLibrary/GetProcAddress to get access to the function instead of loading the DLL at startup and accessing the function using the IAT, or it might call into another DLL that imports FindNextFileW instead of calling it directly.
Code-o-mat 5-May-12 4:40am View
Another thing that comes to my mind, some time ago i was also experimenting with hooking explorer and i found out that the CreateRemoteThread method didn't work, however with SetWindowsHookEx i had much better luck. Don't know what method you use to inject your DLL, just thought i mention it...
Code-o-mat 5-May-12 4:06am View
Not quite sure about this, so i will not add it as a solution, just guessing, but: try adding __stdcall or WINAPI calling convention specifier to your myFindNextFileW. Another important thing here is that -as far as i can see- you are using LoadLibrary in the DLLEntryPoint which is a big NO-NO, if you read the remarks here: . Instead of doing that in the entry point, start a secondary thread and use that to load your hook-dll.
Code-o-mat 4-May-12 7:02am View
Thank you.
Code-o-mat 4-May-12 6:34am View
"Backtracking" then, thanks, i was close. :)
Code-o-mat 4-May-12 6:33am View
You don't need to do it with recurstion, it's just one possible way of doing it...
Code-o-mat 3-May-12 7:52am View
Yourwelcome and good luck.
Code-o-mat 2-May-12 15:07pm View
Are you sure your window's client rect isn't wider or taller than the bitmap? I think if you specify a bigger width or height than the source bitmap's dimensions when using BitBlt like that it will fail.
On a sidenote: you are leaking GDI resources since you never call DeleteObject on the bitmap and DeleteDC on the compatible DC. You also don't save the original bitmap handle that was selected into the compatible DC when selecting the bitmap and don't reselect it (you'd do that before deleting the DC or the bitmap).
Code-o-mat 2-May-12 5:51am View
I have VS2003 installed on a virtual XP and it has DirectShow under "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include", i guess VS6 didn't have it yet then, sorry. As far as i know the DirectX SDK no longer includes the DirectShow SDK, it has been moved to the Windows SDK, so you would need an earlier version of DX SDK, not sure which version, i think DX7 still had DirectShow, or you would need to find the platform/windows SDK for Windows XP. If this thing is important and you need to consult with your manager then i'd say, don't take my word for it and try to look around Microsoft's site for more exact information. It might prove difficult to find support for "such old versions". You can try finding 3rd party sites or look around torrent sites for older DX/Windows/Platform SDK versions but can't say how reliable those might be.
Code-o-mat 2-May-12 5:07am View
Don't know if the Win7 version will work on XP or not, but my guess would be: no. But if you are using VC++6.0, i think that used to include the DirectX SDK and the DirectX SDK used to include the DirectShow SDK at that time when 6.0 was out so you might already have everything installed that you would need (although probably not the latest versions).
For the implementation, i don't know of any examples or somesuch, your google is as good as mine, but i think what i would try to do is to create the graphbuilder, add some video compressor filter, like DivX's to it, add a disk writer filter to it and then tell it to render the URL (i think it should be able to do it). You could -and i recommend it to- use GraphEdit to experiment with the graph until you get the correct results. GraphEdit comes with the DirectShow SDK i think.
Code-o-mat 2-May-12 4:43am View
Well, if by "components" you mean this, then all you will need is some version of Visual Studio (although you probably can use some other IDE if you like) and the Windows SDK (see here: ) which includes the DirectShow API.
Code-o-mat 2-May-12 3:22am View
As far as i know, it depends only on what you put in the graph. You can render streams from an URL, and to record it you can e.g. replace the renderer filter with a compressor and disk-writer filter. I see no reason why that wouldn't work.
Code-o-mat 30-Apr-12 4:36am View
Can it be that the DLL or any of its dependencies have an "incorrect" path "wired into" the code? I mean, e.g. it tries to load that DLL from "c:\windows\system32\" while in win7 it is now located under "c:\windows\system32\interop\" (the paths io just made up). So you see the DLL's are present they are just not where your app looks for them?
Code-o-mat 27-Apr-12 3:49am View
Then my next question would be -as Richard already asked- what is FIND_PROC_BY_NAME. Now, the name is quite obvious, what he probably means is -and it is also what i'd like to see- how does FIND_PROC_BY_NAME work? Do you have the source for this method? If possible, use "improve question" and add the code of this function. It is pretty unlikely that anyone will be able to tell you why it does not work without actually SEEING anything but its name.
Code-o-mat 26-Apr-12 10:18am View
How do you know it is running? If you check task manager, do you see a/the process called setup.exe?
Code-o-mat 25-Apr-12 8:15am View
I doubt anyone will be able to tell you why your application hands from onyl that much information, however, bringing up dialogs from secondary threads in a GUI application is usually a BAD IDEA. You should rather try to bring up the file open dialog from the GUI thread of the application that loaded your DLL and probably pass the information gathered this way to the thread afterwards for processing.
Code-o-mat 24-Apr-12 4:15am View
I think you have to handle blending in the pixel shader, or fragment shader or what's the term for that in OpenGL.
Code-o-mat 23-Apr-12 13:56pm View
Yourwelcome. It happens, i'm glad it worked out. :)
Code-o-mat 23-Apr-12 13:31pm View
Those kind of problems are nasty, my condolences.
Code-o-mat 22-Apr-12 12:32pm View
I noticed, but thank you very much for telling me.
Code-o-mat 22-Apr-12 11:59am View
Explain what you mean by "transparent color". Usually transparent color in relation with a bitmap means the color on the bitmap that indicates "holes" in the bitmap, so when you render the bitmap to some surface, the pixels on the "target surface" would stay unchanged if they would be overwritten by the specified transparent color. But i get the feeling you are not talking about this.
Code-o-mat 20-Apr-12 6:42am View
Yourwelcomz :)
Code-o-mat 18-Apr-12 6:34am View
Also tell us "how it does not give the list", does it give you an error? Does it create an empty list? Does it crash?
A side question: is there maybe a "bitness" difference between the XP and the Win7 system you tried? E.g. XP is 32 bit, Win7 is 64 bit. If yes, could that be the reason it works in one but not in the other?
Code-o-mat 15-Apr-12 4:52am View
A cylinder? Are you talking 3D? You want to work in 3D?
Code-o-mat 11-Apr-12 16:30pm View
Yourwelcome :)
Code-o-mat 11-Apr-12 12:58pm View
Thank you.
Code-o-mat 11-Apr-12 12:44pm View
Yourwelcome. By the way, if you want to wait for a thread's completion you can wait on the thread's handle the same way you would wait on an event, it will get signalled when the thread exits.
Code-o-mat 11-Apr-12 5:06am View
Happens to the best of us. :)
Code-o-mat 11-Apr-12 4:49am View
All right, but how? Show us the code that does the conversion please.
Code-o-mat 11-Apr-12 4:39am View
You didn't provide enough information for us to be able to say anything. What does (double)(float)*this and (double)(double)*this do? I supose you created operators for your class, show us the code for those, and please don't forget the <pre> tags.
Code-o-mat 5-Apr-12 8:38am View
Not really, sorry, if you need such technical information, then you should ask the hardware manufacturers or ask on sound-hardware related forums.
Code-o-mat 4-Apr-12 14:20pm View
Don't know about such a forum, sorry, which of course does not mean it doesn't exist.
Code-o-mat 4-Apr-12 11:03am View
In this case, as Jochen also pointed out, i think your best bet is a proxy server. Since all HTTP traffic would go trough your hotspot, you can detect HTTP requests coming from clients and redirect them to wherever you want them to go.
Code-o-mat 4-Apr-12 9:31am View
Explain a bit more what you mean by "force a client to go to a specific web page". A client connects to your WiFi network, then what happens, what would the client experience?
Code-o-mat 4-Apr-12 4:24am View
Did you try any other OpenGL applications on that machine to see if those work fine? If no, try, maybe the problem isn't caused by your application but by some driver issue or somesuch, if it is so, try upgrading drivers, reinstalling them and so on.
Code-o-mat 3-Apr-12 5:54am View
Just a small addition to bazis' solution, you might try to run a virtual machine -if you have the hardware for it- using e.g. Virtual PC by Microsoft or VMWare player (both are free) to run the linux environment for compiling. Or even the other way around, run Windows and VS on the virtual machine under linux.
Code-o-mat 13-Mar-12 10:51am View
Are you measuring and drawing the items yourself?
Code-o-mat 7-Mar-12 14:42pm View
So you want someone to implement this for you?
Code-o-mat 13-Jan-12 6:34am View
All right, was worth a try i guess. :)
Put a breakpoint on that line and check if the CString is OK or not just before the code executes. If it is bad then the problem is somewhere else, maybe something somewhere overwrites its memory area (e.g. by indexing out of an array or somesuch).
Code-o-mat 13-Jan-12 5:31am View
How about my other two questions?
"When does the code run?" and "are you sure it has been constructed correctly by the time the call is made"?
What i mean is, e.g. you have 2 static objects, Obj1 and Obj2. Obj1's constructor uses Obj2 for something. This will only work if Obj2 has been constructed before Obj1. In one of our projects we ran into this, things were going fine but we did some changes to the project -can't remember anymore what- and all of a sudden it would crash even before it would hit 'main'. It would try to access all bogus pointers and values somewhere, it turned out that whatever the change was we made it modified the order of static object initialization. Could something similar be happening to you?
Code-o-mat 13-Jan-12 4:45am View
When does that code run? Is instImg maybe a "global/static" object? If it ia, are you sure it has been constructed correctly by the time the call is made?
Code-o-mat 13-Jan-12 4:30am View
When you do this:
test frImg = instImg.GetStructObj();
What is instImg? Can it be a reference to an instance of whatever class contains that GetStructObj method? If it is, are you sure it is referencing a valid object?
Code-o-mat 6-Jan-12 6:46am View
Could GetSecurityInfo ( ) be what you are looking for?
Code-o-mat 4-Jan-12 14:16pm View
How about using a transparent proxy? (Try googling for this term)
Code-o-mat 3-Jan-12 7:02am View
Does it happen if you turn off "Aero" in Win7?
Code-o-mat 12-Dec-11 5:13am View
Not sure if it is related or not and if it helps you or not, but a quick google search gave me this: , here they imply that this settings is at:
~/Library/Preferences/.GlobalPreferences ->
I guess if you knew how to read these global preferences then you could query it.
Code-o-mat 23-Nov-11 12:00pm View
Shouldn't you rather look around this: , especially this:
and maybe this:
Code-o-mat 21-Nov-11 4:56am View
Read this: about API Hooking. Of course, if you hook CopyFile or somesuch, that will be also invoked in other situations, not just when the user copy-paste a file/folder. Maybe you could try (also) hooking GetClipboardData, but this again, will most likely be invoked in other situations.
Code-o-mat 20-Nov-11 9:02am View
I don't know if it has anything to do with the window creation or not, but in your control procedure, try calling DefWindowProc trough CallWindowProc instead of doing it directly. For more info see:
Code-o-mat 4-Nov-11 5:42am View
The poster said "in any browser", if you hook the "sends", how will you know if they are being invoked in a browser and not e.g. in a music player that is trying to play some mp3 stream from the net? Or am i taking this too literally?
Code-o-mat 24-Oct-11 8:36am View
Since you have no control over how ANY browser receives URLs and manages them, i'd say what you are asking is not possibe to do, at least not in the form your question suggests.
Code-o-mat 21-Oct-11 10:55am View
Google for "system error codes", however, if the function's return value does not indicate an error it most likely does not touch the last error code thus whatever you read out of it was set by something else earlier.
Code-o-mat 21-Oct-11 7:25am View
Ok, glad you got it to work.
Code-o-mat 21-Oct-11 7:24am View
Ok, glad you got it to work.
Code-o-mat 20-Oct-11 14:13pm View
Well, with UpdateLayeredWindow there seems to be no way to do partial update, but there's UpdateLayeredWindowIndirect (from Vista and up it seems, don't know what your target OS is), the struct passed to this has a member called prcDirty, i belive that can be used to do what you want.
Not sure what you mean in the 'Edit' part of your comment, if you are asking WHEN to update your image, i'd say, every time some visual change is done, e.g. in the handler for WM_MOUSEMOVE when you detect that the mouse got over your button(s) or when it left. If you mean how to get a "clean" background each time you either have to load it every time you update, Or keep your background image loaded AND create a "backbuffer", every time an update is in order, blit the background onto the backbuffer, render your buttons also onto the backbuffer and then use the backbuffer to update the layered window. You could also try storing only the parts of the background that is "under" the buttons to save up on some memory. Does this answer your question?
Code-o-mat 20-Oct-11 10:58am View
Not sure i understand you but...did you try simply re-rendering the whole thing with the hover-image instead of the normal image for the given button and use UpdateLayeredWindow again with the newly created bitmap?
Code-o-mat 2-Oct-11 15:32pm View
And what is your question?
Code-o-mat 30-Sep-11 8:58am View
Ow, sorry, i really thought your message came from the original poster. My bad. This quick-answer system confuses me a bit.
Code-o-mat 30-Sep-11 7:39am View
Without knowing anything specific about your problem it won't be easy to guess for a solution. Based on that i gave a generic one. If what you want to do would work using SSH and a terminal, then i suggest looking for ways to establish an SSH connection (Google is your friend) with the linux machine and sending the command, there's a great tool, Putty[^] whose source code is available for download, maybe checking into it could reveal some usefull things.
Code-o-mat 30-Sep-11 3:26am View
I'm glad it worked out, good luck with the rest.
Code-o-mat 30-Sep-11 3:26am View
I'm glad it worked out, good luck with the rest.
Code-o-mat 29-Sep-11 11:55am View
If you don't mind the "weird" allocation as you said, then:
LPPIXEL *pixels = new LPPIXEL[width];
for (int x = 0; x < width; x++)
pixels[x] = new PIXEL[height];
pixel[x][y].r = ...
or something similar should work.
Code-o-mat 29-Sep-11 10:12am View
I see, but with this:
new PIXEL[width - 1, height - 1 ];
you are not creating a two dimensional array of (with - 1) by (height - 1) items, you are basicly creating a one dimensional array of (height - 1) items.
Check out this[^] for an explanation. Similary to that, here: pixeldata[x, y], you are accessing the "y-th" element of the one dimensional array.
What you can do is create the 1 dimension array of width*height items, and then if you want to address the item at x,y, you access the "y * width + x"-th item. You can write a nice macro to simplify this or create some wrapper and define an operator for accessing the data.