|
i need to know format of jar file.
i.e. zip file is in a set of structs: local_file_head, central_file_head etc.
jar file should be in a set of structs also, but i can't find any info about it.
any hints and links is wanderful.
thx in advance.
includeh10
|
|
|
|
|
I'd start at java.sun.com . Why do you need to know the format? can't you just use sun's jar tool to unpack it.
#include <beer.h>
|
|
|
|
|
i am a c++ programmer, not just a jar file user.
i need jar info dynamically in coding.
anyway, thx.
includeh10
|
|
|
|
|
Try this link:
http://www.wotsit.org/download.asp?f=jar
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i viewed the site few hrs ago, it is too simple.
hope get more links.
thx
includeh10
|
|
|
|
|
I've been able to rename a .jar file to .zip and all my zip routines work just great on it. I think the only thing different is the presence of some kind of manifest file, but I'm not certain.
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
I've copied the resource for making the project work both in english and german language.It worked fine in DEBUG version but in RELEASE version its giving application error and it gets closed.
|
|
|
|
|
|
I saw ur article.It was nice.But its something similar to that.I'm following doc-view architecture for my project.When i change the language settings the view needs to be updated with the language settings......But if i refresh the view its not happening and error is raised in RELEASE version.
|
|
|
|
|
I would say it is unlikely any internationalisation code would raise an error, unless of course the resource IDs are not consistent between languages, possibly an ID for a control has been swopped for a string resource.
As a test I would suggest you copy your default language resources to a new language, i.e. English to French, but do NOT change any of the resouces. Run a test changing the language to French is you don't get an exception then check your resource IDs. If you still get an exception then the error is elsewhere.
Hope this helps. Ahh I do remember a bug in Visual C++ I think it was V 6.0 but fixed on sp3 or sp4, but that did not cause an exception, just the language would not change.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Intel is no longer offering its IJL jpeg library.
Where i could download it ? Anyone has it, could send it to me ?
|
|
|
|
|
search for IJL in google and you will see many options where you can find IJL. I guess it is also available at intel's site. all the best.
cheers
Himanshu
|
|
|
|
|
How can I write a Program in Visual C, that takes over the Desktop and Mouse-Functions of another
Windows-NT PC in a LAN/WAN (like SMS, or pcAnywhere it does) ?.
Is there an API available, or an example ?
Who knows the answer ??
|
|
|
|
|
Well, I'm hoping you're thinking of remote administration, rather than nasty hacker stuff, but the source code to VNC is freely available http://www.realvnc.com[^] though, tbh, if you just want a free and simple remote admin/control system then I don't see why you'd need to actually modify VNC at all - it works brilliantly as it is
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
dear all,
i get a warning
D:\Schd\Config.cpp(117) : warning C4172: returning address of local variable or temporary
when i compile this code:-
char *CConfig::InputFilePath ()
{
char *inp;
** inp = new char[MAXCHARS];
int i= GetPrivateProfileString("Paths", "inputfile", "" ,inp, MAXCHARS, IniPath);
CString path(inp);
char filename[11];
int ch = 92;
unsigned int result;
char *pdest;
char iPath[MAXCHARS];
try
{
if ( (path == "") || CConfig::DoesDirectoryExist (inp) == false )
{
path = "";
strcpy(iPath,"");
return iPath;
}
pdest = strrchr( path, ch );
result = pdest - path + 1;
if ( result == strlen(path) )
{
strcpy(filename,"Input.con");
}
else
{
strcpy(filename,"\\Input.con");
}
strcpy(inp,path);
strcpy(inp, strncat( inp, filename,strlen(filename)));
}
catch(...)
{
path = "";
strcpy(iPath,"");
return iPath;
/*strcpy(filename,"\\Input.con");
strcpy(inp, strncat(_getcwd( buffer, _MAX_PATH), filename,strlen(filename)));*/
}
strcpy(iPath,inp);
delete [] inp;
return iPath;
}
also sometimes i get warning :-
detected memory leaks,
Object dump complete,
at location ** in the code
can anyone suggest some solutions!
thanx,
|
|
|
|
|
char *CConfig::InputFilePath ()
{
...
char iPath[MAXCHARS];
...
return iPath;
} The problem is very accurately described by the warning you're having. iPath gets destroyed as soon as InputFilePath exits, so returning its address is illegal. The simplest solution, probably, is to return a CString :
CString CConfig::InputFilePath ()
{
...
char iPath[MAXCHARS];
...
return iPath;
} Even if this fix works, I'd strongly suggest that you try to fully understand why your problem was happening, since it is a common error in beginners and something similar could shoot you in the future when least expected.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanx for the TIP Joaquín!
i'll keep it in mind and'll try to stick to it!
but is there anyother way to get rid if the specified scenario!
also can u help me with the memory leak while i'm deleting the pointer inp.
thanx a ton!
|
|
|
|
|
also can u help me with the memory leak while i'm deleting the pointer inp.
** inp = new char[MAXCHARS]; should be
inp = new char[MAXCHARS]; I'm surprised that the code even compiled
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
sorry, but u misread my first thread.
** was to imply that THIS line of code gives memory leak warning! (** acted like a label in my thread, thats it!)
rishabhs
|
|
|
|
|
dear all,
the code (in Bold) generates a memory leak and i get a warning, Object dump complete
char *CConfig::InputFilePath ()
{
char *inp;
inp = new char[MAXCHARS]; /*??Memory Leak, but it is deleted later in the code */
int i= GetPrivateProfileString("Paths", "inputfile", "" ,inp, MAXCHARS, IniPath);
CString path(inp);
char filename[11];
int ch = 92;
unsigned int result;
char *pdest;
char iPath[MAXCHARS];
try
{
if ( (path == "") || CConfig::DoesDirectoryExist (inp) == false )
{
path = "";
strcpy(iPath,"");
return iPath;
}
pdest = strrchr( path, ch );
result = pdest - path + 1;
if ( result == strlen(path) )
{
strcpy(filename,"Input.con");
}
else
{
strcpy(filename,"\\Input.con");
}
strcpy(inp,path);
strcpy(inp, strncat( inp, filename,strlen(filename)));
}
catch(...)
{
path = "";
strcpy(iPath,"");
return iPath;
}
strcpy(iPath,inp);
delete [] inp;
return iPath;
}
can someone tell me why this leak is occurring and how to prevent it!
thanx
|
|
|
|
|
You need to look at the possibility of the function exiting before delete is called. From your code it looks like if an exception is thrown that's what happens; you catch it, and then return without freeing inp.
You may want to consider not allocating inp dynamically since it's always got a constant size (MAXCHARS).
char inp[MAXCHARS];
Another alternative is to dynamically allocate it, but on the stack using alloca:
char* inp = (char*)alloca(MAXCHARS);
Then you don't need to worry about explicitly freeing it since it will happen automatically.
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
You should look at your routine, and, before EVERY return, you should delete []inp.
You have 3 return points on your routine.
That's why some people advocate that routines should be structured so they have only one point of return. I'm not so rigid at this rule, but surely C++ beginners can benefit from writing routines with only one return point.
I see dumb people
|
|
|
|
|
I agree. A single return is one of the rules I would stick to as a new programmer. After you have been programming for many years, you learn how to safely break the rules such as "single return" or "no goto".
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I was drawn ploygon using Mouse on a DialogBox(not by Graphics commands of polygon), now i want to save this drawing to a file and restore it to back, how can i do this ?
Thank you
-Umakanth
|
|
|
|
|
an example (but i can't remember its name) in msdn (first lesson about MFC) tells exactly what u need.
the example includes several steps, about using collections and how to save and open data.
includeh10
|
|
|
|