|
Hello,
Thanks for the information.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
You can know this by yourself debugging. Put a breakpoint in your descructor, for exemple.
|
|
|
|
|
I know, but I'm always looking for an excuse to surf to codeproject.com
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Hello, I'm using VC++ .NET 2003 and I'm fairly new to it and to GUI programming in general. For my current project I need to interact with some legacy C code that uses character arrays for strings.
I was able to convert from a system::string to a character array using the "PtrToStringChars" method but I can't, for the life of me, figure out how to convert an old-school char array back into a system::string.
Oh and the reasoning is that basically I need to parse a textbox in my form, convert the contents to a char array for the c code, then take a char array returned by the c code and convert it back to a managed string to be displayed in another textbox on the form. Make sense?
So... how do I do it!?
|
|
|
|
|
Dear Friends,
I got a CString. What i want to find out is whether the first character in that CString is a Number (i.e 0 to 9). How can i do so ??
|
|
|
|
|
Use isdigit() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes, use IsDigit(), and you can reference the first character of a CString like a char array (ie mystring[0] )
[A brave person isn't always necessarily a smart person]
bdiamond
|
|
|
|
|
Yep
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Cool!! Didn't know you could access it like an array.
|
|
|
|
|
Does anyone know how to run a C# procedure that is located in a dll from a C++ .net dll?
Thanks
Max
|
|
|
|
|
Hello !
I just started DirectX programming (based on samples I found on several websites). In fact I want to make a game (so in fullscreen mode). Everything is ok for that part but the problem when using this exclusive & fullscreen mode is that you cannot debug anymore (the screen remains black when a break point is reached in your code).
So I wanted to first start by using a windowed game for debugging purpose. But there the problem is when I try to create the front buffer using CreateSurface (with CooperativeLevel flags set to DDSCL_NORMAL):
DDSURFACEDESC2 ddsd;<br />
ZeroMemory( &ddsd, sizeof( ddsd ) );<br />
<br />
ddsd.dwSize = sizeof( ddsd );<br />
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;<br />
<br />
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE |<br />
DDSCAPS_FLIP |<br />
DDSCAPS_COMPLEX;<br />
<br />
ddsd.dwBackBufferCount = 1;<br />
<br />
hRet = m_pDirectDraw->CreateSurface(&ddsd, &m_pFrontBuffer, NULL );
The function returns DDERR_NOEXCLUSIVEMODE ...
How can I solve the problem ??
|
|
|
|
|
I recall having that same problem before about breakpoints in fullscreen mode. I think you can alt+tab or something like that to get back to the development environment.
[A brave person isn't always necessarily a smart person]
bdiamond
|
|
|
|
|
No, in fact what happens is that when I reached a breakpoint, I can see the taskbar but the rest of the screen is still black (wathever I do, also using alt+tab...). This is quite annoying
|
|
|
|
|
You may want to invest in a second monitor. You can then run the IDE on the second monitor and debug your DirectX application on the first monitor.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Mhh, yes that could be a solution but this project is just for spare time and so, I don't want to buy a second monitor just for that...
Isn't it possible to debug DirectX applications ????
|
|
|
|
|
cedric moonen wrote:
Isn't it possible to debug DirectX applications ????
I have had the same trouble debugging a fullscreen DX application with a single monitor. I don't think there is an easy way round this given a single monitor setup and the standard IDE.
There is a debugging tool called SoftIce. We use it at work to debug drivers and shared memory between applications. SoftIce has the advantage of freezing the applications and switching to its own debug screen (text driven screen). This would allow you to debug DX applications quite easily.
http://www.compuware.com/products/driverstudio/softice.htm[^]
Not sure on the cost of this though!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Ok thanks, I will take a look at it
|
|
|
|
|
I have been working with directx for a long time (like 7 years) and the best way to debug an application is to use the remote debugging (debug via a second pc) feature of visual studio. Local debugging will only cause you problems as you can not flip the screen to the windows GUI to break your code.
John
|
|
|
|
|
hello..
is there an API function or something to enumerate remote computers names on a LAN??
|
|
|
|
|
I think you are looking for NetServerEnum() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello All,
I am trying to memory mappin technique to parse zone file. The program is running fine for small file of size around 350MB but the same program failes when the file size becomes 2.5GB
Here is a simple program which works fine for small files but fails for large files:
#include <windows.h><br />
#include<stdio.h><br />
<br />
<br />
<br />
int main(void)<br />
{<br />
<br />
char * p1stData;<br />
HANDLE hMap1stFile; <br />
HANDLE h1stFile; <br />
LPVOID lp1stMapAddress; <br />
h1stFile = CreateFile("biz.zone", GENERIC_READ | GENERIC_WRITE, 0, NULL,<br />
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);<br />
if (h1stFile == INVALID_HANDLE_VALUE)<br />
{<br />
printf("h1stFile is NULL\n");<br />
printf("Target file is %s\n", "biz.zone");<br />
return 4;<br />
}<br />
hMap1stFile = CreateFileMapping( h1stFile,
NULL,
PAGE_READWRITE,
0,
0,
NULL);
<br />
if (hMap1stFile == NULL) <br />
{<br />
printf("hMap1stFile is NULL: last error: %d\n", GetLastError() );<br />
return (2);<br />
}<br />
lp1stMapAddress = MapViewOfFile(hMap1stFile,
FILE_MAP_ALL_ACCESS,
0,
0,
0);
if (lp1stMapAddress == NULL) <br />
{<br />
printf("lp1stMapAddress is NULL: last error: %d\n", GetLastError());<br />
return 3;<br />
}<br />
<br />
<br />
p1stData = (char *) lp1stMapAddress;
<br />
<br />
for(int i=0;i<1000;i++)<br />
{<br />
printf("%c",*p1stData);<br />
}<br />
return 0;<br />
}
The error that comes is:
hMap1stFile is NULL: last error: 1006
Is there any upper limit on the file size which can be memory mapped.
dotcom
|
|
|
|
|
krabhinav wrote:
Is there any upper limit on the file size which can be memory mapped.
I would think so, especially if memory allocation is involved. Remember that asking for 2.5GB of RAM means that 2.5GB of contiguous RAM must exist or the allocation fails. That aside, error 1006 says that the volume for a file has been externally altered so that the opened file is no longer valid.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
Can I add a accelerator key to Button and Toolbar. When the user presses any Alt+Key, the button and toolbar button functions must be invoked just as in case of a menu.
Can any one please suggest any solution to this
Thanks
Madhavi
|
|
|
|
|
Hi,
I do hope that you'll be using sdi/mdi appln. so in the Accelerator resource named IDR_MAINFRAME, add a new entry with the name of the control say IDC_BUTTON_TEST and assign the key stroke to it. It will call the handler.
SUjan
|
|
|
|
|
Hi,
Yes I am able to add accelerator keys using Accelerator tabel to individual buttons. But I have one problem. I'm unable to display the underscore symbol beneath the letter in the caption for Buttons(Toolbar buttons) for the user to know that accelerator key is present.
Madhavi
|
|
|
|