|
|
|
I guess maybe my database is old or bad command or...
|
|
|
|
|
hi . i want read the file ü to Content-Type: text/html; world .i find both these point starting "ü" and end"Content-Type: text/html" . that is .dbx extension file. i want to read the matter of these starting and ending point in vc++.
how i can read the text between to point starting and ending point.
naveen padiyar
|
|
|
|
|
Does any one know how to create a .dat file.
Not just saving a text file by changing the extension.
The file should only be opened using specified program and
not by other editors.
For example,Yahoo messenger archieves are stored in
.dat file format.
I want to save the data of my application in a safer way.
Help please.
Thanks
|
|
|
|
|
poda123 wrote: Does any one know how to create a .dat file.
Not just saving a text file by changing the extension.
A .dat file will have it's own file format, which won't be text. You can similarly define any file format that you like. Typically, these will contain metadata to define the values that are coming up, or will be fixed and, for example, store numbers as numbers, instead of as ASCII or Unicode values. Another option is to use compression or encryption to hide your data in your format.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That's what really I want.
How to define my own file format.
|
|
|
|
|
At first you should think on how do you want to store that data, then serialize that data into a file using a function that encapsulates the way you want to do it. In fact, you could generate a "document" class with a load and save functions.
You can make it as complicated as you want by applying encryption methods and others, but you must decide how to do it.
In fact if you want to generate some kind of file that only your application must be able to open and understand, you should decide how do you want to store that data without thinking on making it standard in any way.
If you want to open that file automatically with your application then register the file extension.
Hope this helps.
|
|
|
|
|
There are many different ways. For instance if you want to store point coordinates you can create a structure like this
struct Point
{
double x;
double y;
};
and store all points you have consequentially in the file. There are different ways of doing that too. The simplest is using <stdio.h>
FILE* f = fopen("test.dat","bw");
fclose(f);
modified 8-Mar-17 3:51am.
|
|
|
|
|
Thanks for suggestions!
Thank you.
|
|
|
|
|
poda123 wrote: Does any one know how to create a .dat file.
In exactly the same way as you would any other file. A file's extension has no bearing on how it is created.
poda123 wrote: The file should only be opened using specified program and
not by other editors.
This is rather difficult, if at all, to achieve.
poda123 wrote: For example,Yahoo messenger archieves are stored in
.dat file format.
But that does not imply that YM could open any .dat file, only those that it created.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello Friends,
I want to change the Cursor when mouse is on Button.
This I want to do in ATL.
Abhijeet
|
|
|
|
|
You Can use SetCursor . Use CComModule::m_hInst as first parameter.
|
|
|
|
|
Alternatively, you can derive a class from CButton, implement a static method RegisterClass that will retrieve the BUTTON class info using GetClassInfo(Ex), then replace the class name with your class name, window procedure with yours and also the class hCursor with the desired cursor.
A similar technique can be found in MSDN for custom dialog classes.
|
|
|
|
|
Hi All
Is there any alternative function for atof() which accept wchar_t datat and convert to float.
Thanks
Atool
Atool
|
|
|
|
|
_wtoi
you can find it, togheter with _ttoi , the generic one, in MSDN, if you search for atoi , haven't you?
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.
|
|
|
|
|
CPallini wrote: _wtoi
How does that relate to floating-point numbers?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry I was sure we were talking about atoi !!
It seems that atof has not a wide-string cousin.
Workarounds, I guess, maybe:
(1) using WideCharToMultiByte and then atof .
(2) using swscanf
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.
|
|
|
|
|
The C runtime reference lists all the forms of functions including a table with the generic
text versions.
F1 is your friend
try _wtof
|
|
|
|
|
Hi
I want to add a com dll in my c++ project. I also post this query before and one experts suggets me to use explicit linking
and i follow the suggested steps.But now object of dll has been created but it disply exception.
i psate the code here
#import "Redemption.dll" no_namespace
HRESULT In=CoInitialize(NULL);
if ( SUCCEEDED ( In ) )
{
IRDOSession* Session=NULL;
iRDOStoresPtr ptr;
HRESULT hr =CoCreateInstance( __uuidof(RDOSession),
NULL,
CLSCTX_INPROC_SERVER,
//CLSCTX_LOCAL_SERVER,
__uuidof(IRDOSession),
(void**) &Session
);
if ( SUCCEEDED ( hr ) )
{
// Call methods using pISL here.
//Session->Logon(" ",NULL,NULL,NULL,NULL,NULL);
ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New");
}
Session->Release();
CoUninitialize();
}
the object is accessing all members but when called it display exception.
Plz tell what the prblem is.I got confused.
manu
|
|
|
|
|
manu_2205 wrote: ptr=Session->Stores->AddPSTStore("c:\w.pst",NULL,"New");
Try to replace the \ character with a double backslash (\\)
You should get at least a compiler warning, since escape-w isn't a valid escape character (or is it?).
Stores->AddPSTStore("c:\\w.pst",NULL,"New");
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I try Again it display exception.
Even it has a Logon() function .It also disply run time error.
I am not getting what the problem is .
When i debug the application it open .tli file and disply exception.
manu
|
|
|
|
|
I want to tell that
IRDOSession :- is a interface
RDOSession:-It is coclass
manu
|
|
|
|
|
Hi manu,
try passing BSTR or unicode strings as the parameter value.
do not pass strings like "" etc,
give some value like L"myValue".
^-^
@|@
- redCat
|
|
|
|
|
What function?Whats values of input this function and what return value?
|
|
|
|