|
"%C3%B6" is a two byte character, perhaps the issue has something to do with character encoding (UTF-8 vs UTF-16)?
Edit: I see that 0xF6 (246 decimal) is ASCII character "ö".
|
|
|
|
|
HI,
I am trying to register a dll through regsvr32 but I am getting error:
"the module "mydll.dll" failed to load on my XP system with VS 2008"
Can you suggest me what settings I need to take care, same library is running on other system Win7 + VS2008.
|
|
|
|
|
What is the exact error message? "The module failed to load" could probably mean that regsvr32 could not even find the DLL. Verify the path you provide to it.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Does your dll have any dependencies which are not on the target system? Run depends.exe on your dll to check.
==============================
Nothing to say.
|
|
|
|
|
mouse_event( MOUSEEVENTF_LEFTDOWN, 0,0,0,NULL);
mouse_event( MOUSEEVENTF_LEFTUP, 0,0,0,NULL);
VOID mouse_event( DWORD dwFlags,
DWORD dx,
DWORD dy,
DWORD dwData,
ULONG_PTR dwExtraInfo
);
|
|
|
|
|
catokat wrote: move mouse to pt.x,pt.y???
You can use SetCursorPos()[^], which does exactly that (unless you're wanting to use mouse_event for some reason).
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Is there a function available that can return the Maximum number of bytes accessible in RAM for a 32 Bit App? It might be running on either 32 or 64 Bit machines.
I know of the flag /LARGEADDRESSAWARE. What I am specifically looking for is a function that can tell me the number of bytes as numeric quantity.
|
|
|
|
|
Try GlobalMemoryStatusEx[^] maybe.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hi Divya,
The maximum virtual address can be determined by doing something like:
SYSTEM_INFO si = {0};
GetSystemInfo(&si);
DWORD_PTR dwMaximumAddress = (DWORD_PTR)si.lpMaximumApplicationAddress;
If you wanted to determine if the physical address extensions are enabled on a 32 bit OS you could then do something like:
BOOL bPAE = ((DWORD_PTR)si.lpMaximumApplicationAddress >= 0xBFFFFFFF);
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks a ton, David! I will try to figure out what to do with those details.
|
|
|
|
|
Divya, marking his reply as answer will help others know that it's a good answer and that it helped you. I've marked it now, and you can too.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
As mentioned, GetSysInfo() will give you the physical memory, but then you have to ask yourself why you want to know this since half of this is physically reserved for the kernel, but the virtual memory each process runs in will be addressable memory up to 4 GB regardless of what you have physically.
So, what are you trying to do and why?
==============================
Nothing to say.
|
|
|
|
|
Eric, what I am trying to find is 'guess-timate' (I finally found an occasion to use this word) the amount of memory available to my application (a rather loose statement, I know.. but hopefully gives the idea).
An algorithm in the app that needs quite a lot of memory would need to know if that memory is available or not. Its a dedicated app, there is little chance of some other app requesting a large chunk of memory in parallel.
The memory the algorithm will use is known (or can be approximately figured out based on the input data). So I was hoping that these 2 numbers (available memory and needed memory) would help in a quick decision making as to whether we should proceed with the processing or not.
thanks for the reply!
|
|
|
|
|
OK, so in fact you can allocate a massive chunk of memory, because the system will page it out for you if it cant physically fit in RAM. (It will page it out in pages, 4k chunks, so you might want to organise your memory usage so commonly used stuff is on the same page(s) in order to keep it resident in memory)
==============================
Nothing to say.
|
|
|
|
|
Also note that "available memory" != "biggest continous block you can allocate". What i mean is something like this:
[1 MB of free memory][2 MB of already allocated memory][3 MB of free memory]
If you query the amount of free memory, you get 4 MB, if you try to allocate a 4 MB block, it will fail because the biggest continous free chunk is only 3MB. I'm just sayinmg because we ran into this already once or twice...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
hi
i had create progress bar which is moving nicely according to my need .
i had two label that is at starting point as (progress) and as (0%).
i want to know how to update the (0%) according to my current positions.
help me out of this .
thanks
|
|
|
|
|
Is your label a static control? If so, have you tried calling SetWindowText() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
|
When you create the window for the "0%" do you give it it's own unique ID, or juts use -1 or some other generic value. My reason for asking is that typically when creating a static control using a dialog/resource editor, the control gets an ID that can thwart an attempt to uniquely identify it later. (unless you maintain a global variable that holds the HWND of the static control)
The two approaches you may use are (1) maintain a global variable to hold the HWND of the control and (2) use a #define to give the static control a unique ID.
In the first approach you have the HWND already and just need to set the text, while the second approach means you need to retrieve the HWND by using the control id, before then going on to alter the text.
Approach 1:
HWND globalPercentCompleteLabelHwnd;
globalPercentCompleteLabelHwnd = CreateWindow(WC_STATIC, "0%", windowStyle, xPos,yPos, width,height, hwndParent, (HMENU)-1, hInstance, NULL);
...
...
...
SetWindowText(globalPercentCompleteLabelHwnd, "Some new text");
Approach 2:
#define IDC_PERCENT_STATIC 10001 // or any other arbitrary, UNIQUE id
CreateWindow(WC_STATIC, "0%", windowStyle, xPos,yPos, width,height, hwndParent, (HMENU)IDC_PERCENT_STATIC, hInstance, NULL);
...
...
...
HWND tmpCompleteLabelHwnd = GetDlgItem(hwndParent, ID_PERCENT_STATIC);
SetWindowText(tmpPercentCompleteLabelHwnd, "Some other new text");
Approach 1 relies on maintaining a global variable, while the second method implies a way of gaining access to the HWND of the control's parent - which you already have if changing the text inside the main WindowProcedure.
modified on Monday, September 19, 2011 10:40 AM
|
|
|
|
|
And what happened?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
|
|
I created a dlll using atl libaray with VS2008, how can I debug dll(COM)?
|
|
|
|
|
john5632 wrote: how can I debug dll(COM)
I assume you have an Exe associated with that dll.
Place breakpoints in your DLL and mention the Executable(exe) as the startup program in your Dll.This way you can step in to the code and watch the variables etc
Hope this helps!
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Create the test application in the same solution. Put the breakpoints in the COM dll sour code. Load the COM library in that test app, instantiate/query the required Interfaces/CoClasses. This is one of basic technique.
|
|
|
|