c_str() is a function and can't be assigned a value. You can cast the character pointer to an ansistring though.
char CharBuf[100];
AnsiString Value;
FileRead(FilePtr, &CharBuf, 99);
CharBuf[100] = NULL;
Value = (AnsiString)CharBuf;
I can't remember, but I don't think you even need the...
Can you post the code? Instead of using memcpy, you could also bitwise OR them.
int x=0;
x = (int)((unsigned short int)byte1 | (((unsigned short int)byte2) << 8));
This produces a word from two bytes, then casts it to an int.
Chris
You said it works okay on windows 98 if you compile under version 6.0? It sounds like a compiler version issue, but it could be an MFC version issue. Maybe contact Borland with this info and they can look into it.
Chris
You can create a header structure in the file that contains information about what's in the file. i.e. you might store how many sound clips are in the file, the sizes of each clip, and properties of each clip. Then use the header information to access items in the file.
Chris
It depends largely on the file type. You could split it as long as it's a raw format and as long as you place the correct header data in the new file. If it is compressed, it becomes much more difficult, but still do-able. I agree with Totte. It would be better time spent to find a program...
I'm no database expert either, but I think that some of them put the database into memory, and changes must be committed (i.e. saved to file) before they get saved. That way, moving things in memory is fast. I could be wrong though, just seems like I read that somewhere.
Chris
I would check out the MSDN pages at Microsoft. I don't think Borland has that capability inherently (at least not up to version 6.0). You'll have to call a Microsoft MFC function or something out of an SDK they might have for download.
Chris
This is a little tricky. It depends on how you use the thread. If you are going to create the thread many times in a program instance, you need to be careful. If you just create the thread when the program starts up and destroy the thread when the program ends, you can just call Terminate()...
I would think you could write a simple bit of executable code that's only job is to delete another set of files when you're done with them, copy that executable into memory and run it from there. This is what some viruses do.
Chris
Maybe you should be performing some actions. Generally, a crash like that would be some object, class, or COM that was not correctly destroyed. Do you have anything dynamic that you're creating or threads that are executing?
You can drop a web browser component, like one of the Indy components I think (I know there's one somewhere with BCB6). Then just set the data for the web component to be fixed text you define elsewhere or in a file, then when they see the web browser component, it will parse the html like you...
You can have any component that has a HANDLE (or Handle in Borland) parameter accept dragged files.
To do this, call the Microsoft function DragAcceptFiles(Handle, true). To disable, set true to false. You can find more on this information in the Microsoft help files Win32 Programmer's...
I'm sorry, I wasn't very clear. The command line string returned is not just the parameters. It is the entire command line. You must then parse it with your own code. You should just parse it by spaces. Then check to see how many different strings were returned. The first string will...
I don't understand what you mean by address. You want the memory address of the character pointer? You say *Addr = something before you ever assign Addr to a location. See, when you created Addr:
WORD *Addr;
It has no data, because it's not pointing to a WORD yet. So if you dereference it...
Yes, that should be possible. Do you have Build with Runtime Packages unchecked in the options menu? How did you integrate the activeX control into borland? Through the "Install ActiveX Control" menu?
Chris
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.