|
Hi,
My intend is to hav that resource only in dll. the reason is memory at run time.
now by copting the resource in both project works fine, but my intention is to hav that resource in dll project only.
sir as u suggest to create a dll with resource only that i hav tried but it is giving an error 1813, using getLastError()..i.e the image file can not be find. Again i tyed to look for that image file in msdn, but didnt get proper solution..
|
|
|
|
|
All resource loading APIs take a HINSTANCE handle to the module containing the resource.
If the resource is in a dll, you use a module instance handle to the DLL.
|
|
|
|
|
hi..all
how can i use the function GetencoderClsid(L"",&CLSID);
in VC++ 6.
Please let me know about it ,it's urgent.
Thank you.
There Is Nothing Right & Wrong
|
|
|
|
|
|
What class is this method in?
|
|
|
|
|
Dear All,
I would know that what is Release mode and Debug mode ?
bye.
|
|
|
|
|
A release build is what you release to the public. A debug build is what you use when debugging. The debug version will contain a lot of extra information, hence have a larger size.
|
|
|
|
|
You can see an article about release & debug mode and different their on codeproject,search about it
|
|
|
|
|
How to pass the filename to my program on
right click a file -> select my app
I have modified the registry to show my app on menu & invoke my app.
How i pass the filename as commandline or anyother way
|
|
|
|
|
i think the file will be passed as the command line. Did u check the command line using GetCommandLine()?
nave
|
|
|
|
|
anilFirst wrote: How i pass the filename as commandline or anyother way
That's what the %1 was for that you added to the registry.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part.
Thanks in advance
kamalesh
|
|
|
|
|
Use feek and ftell functions.
Those two might help you.
bye.
|
|
|
|
|
One way is to read the entire file contents into a buffer, modify the buffer, and write the buffer back out to the file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hello,
i am developing an application which i have to compare two wav files!Do you have to suggest me something(e.x. link)?How can i do it because i am newbbie on the issue!
Thanks
|
|
|
|
|
Hi all,
Simple question .... (funny that I can't remember how to do it)
I have variable:
char TestString[3];
How can one test if the TestString is Empty
I have tried the following, without success:
<br />
if (TestString == "")<br />
{ <br />
....<br />
}<br />
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
strlen .
Programm3r wrote: char TestString[3];
In this case, it will not be an empty string.Contains some garbage.
try,
char TestString[3] = {0};
or
char TestString[3] = "";
cout<<strlen(TestString)<<endl;
It will give you desired output. i.e. output will be 0, which indiacates empty string.
|
|
|
|
|
You need to do
if(strlen(TestString) == 0)
or
if(strcmp(TestString, "") == 0)
Remember that your string will not be initialised when you declare it though, so neither test is valid until you've put something into the string (NULL for the first character at the very least). Or you can do the following...
memset(&TestString[0], 0, sizeof(TestString));
Hope this helps,
Joel.
|
|
|
|
|
Your string
Programm3r wrote:
char TestString[3];<code></blockquote><br />
<br />
is not empty, it's random (junk) initialised (end it is not <code>NULL terminated!).
maybe the following code snipped will help you:
char TestString[3]="";
if (!strcmp(TestString, ""))
{
printf("empty\n");
}
else
{
printf("not empty: %s\n", TestString);
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
if (!TestString[0])
{
// The first character is null, therefore it's empty
}
That's assuming you have set it to be empty. This is one of many reasons to avoid char arrays and use std::string or CString. Unless you're trapped in C, which I seem to recall, you are.
In this case, make sure you use memset to clear the contents of a new char array, so the above test will work. All the other tests will do the same thing, they will look to see how many characters there are before a NULL.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
In addition to all the things said, it's always good programming practice to initialize the variables before testing on them.
IMO, one common reason for problem is that memory is allocated differently in debug and release mode.
In debug, the allocated buffer becomes filled with null-bytes.
In release-build, it isn't. It's filled with junk characters (whatever is on the stack).
So (without initializing) testing for '\0' at index 0 works in debug mode, but not in release mode.
That's something to watch out for..
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
kakan wrote: n debug, the allocated buffer becomes filled with null-bytes.
In release-build, it isn't. It's filled with junk characters (whatever is on the stack).
and this is the source of very weird bugs.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello,
when i include a header file of a class in a ".c" file ...i get error ... "class name" is undefined identifier.
how do i solve this?
amy clues?
regards
Shailesh
|
|
|
|