Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Prattaratt

  1. Prattaratt

    How To Get The Base Address with c++?

    The Operating system and your anti-virus should not allow you to write to your program's code segments after it is loaded into memory. Any attempt to do so will result in either a AV fault and program crash or the anti-virus quarantining your program. This a very specific viral behavior that...
  2. Prattaratt

    Apache HTTP Server and WIndows 10

    Has anybody tried using any of the Apache web servers with Windows 10 yet? Any comments from those who have?
  3. Prattaratt

    Terminate Program Upon Error

    There are several Windows API functions you could use to notify a parent process that the child process has crapped out. The Exception model is only for use within a process; DLL's can use exceptions to notify calling processes because they use the same stack frame and memory space. To...
  4. Prattaratt

    Puzzling first char in streamed file

    A stream in Delphi and C++ is just a more generic mechanism for transferring information. In Object oriented languages like Delphi and C++, streams allow you to send and receive information from a device, whether it be a keyboard, Display device, File system or IP Socket without having to worry...
  5. Prattaratt

    Puzzling first char in streamed file

    In that case, TStringStream and TSTringList are both good candidates, and they have the advantage of using the default String type which is Unicode in current versions going back to 2009. TStringList has streaming and file functions built in; you just call TStringlist.LoadFromStream and...
  6. Prattaratt

    Puzzling first char in streamed file

    The shortstring is the implementation of the original Pascal string type; the OP may be doing something that he wants to be compatible with other Pascal compilers. I generally don't ask why somebody is doing something a certain way unless it is obviously a wrong or dangerous way of doing it, I...
  7. Prattaratt

    Puzzling first char in streamed file

    I meant to type 255 characters, not 254.
  8. Prattaratt

    Puzzling first char in streamed file

    In a short string, the leading byte (i.e. Temp[0]) is a length byte, denoting the number of characters in the string. This is why it cannot be more than 254 chars long. In other words, length(Temp) = Temp[0]; see the following from Delphi's online help: Delphi Short String
  9. Prattaratt

    Run different queries based on value of Combo Box.

    Yes, you are correct in that it should be parentheses instead of brackets. I have just been coding in C++ and Delphi instead of Basic for a long stretch and just got accustomed to their style of indexing. MajP's comments are all on target.
  10. Prattaratt

    Run different queries based on value of Combo Box.

    Use database.QueryDefs.execute instead of DoCmd.Open. Try using something like this: Private Sub Combo60_AfterUpdate() dim Qname as string Dim DB as Database Dim RowsChanged as Integer Set DB = CurrentDB Select Case Me.Combo60.Column(1) Case 1 QName = "qry_UPD_MReq_ReceipientShip"...
  11. Prattaratt

    Android ALOOPER_POLL_ERROR

    Started using AppMethod with C++ (Same compiler as 64 bit C++ Builder) for Android just to see what it could do. First app, going just fine until I test restarting the App. I get a ALOOPER_POLL_ERROR exception. Has anyone else here had this problem, and if so, how did you solve it? I have...
  12. Prattaratt

    CoInitialize has not been called

    The problem is that TService automatically creates a new TServiceThread on its own when it starts. Try moving all your ADO startup code into the TService.OnStart event along with the CoInitialize statement.
  13. Prattaratt

    How to call events on events

    Just call it like you would any other function: TForm1::Button1Click(TObject *Sender) { Application->MessageBox("Button1 Handler!", NULL, MB_Ok); }; TForm1::Button2Click(TObject *Sender) { Button1Click(Sender); //calls Button1's handler }; Or, if you want to call it from the event...
  14. Prattaratt

    XML Data Transform without XML Mapper

    Does anyone have a reference or link to creating XML data transform files without using XML Mapper? I only have DelphiXE2 Pro, which does not include XML Mapper.
  15. Prattaratt

    How to concatenate strings in new Delphi (old way no longer works) E2008 Incompatible types

    Why are you using char arrays instead of the default string type? The listbox.items will accept them, and concatenation should be availble with + operator.

Part and Inventory Search

Back
Top