Search:

Type: Posts; User: MAtkins

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. This is solved. I never found the problem but...

    This is solved. I never found the problem but started again with an older file and worked my way back to functional.
  2. How can I find out why my function won't work?

    I'm writing a php extension that allows users on an Intranet to print documents. PHP, and therefore the extension is written in c.

    I had this just about wrapped up when a new error cropped up....
  3. Thanks Salem. Yea I'm thinking I've started...

    Thanks Salem. Yea I'm thinking I've started chasing a wild goose here.

    I'm trying to print text using Windows GDI.
    I need to specify the font size in points (ie Arial 12 point). The GDI prints it...
  4. Thanks for your reply. It looks *to me* like...

    Thanks for your reply.
    It looks *to me* like most of these solutions could cause an overflow because they could end up with a 128 bit number.

    I looked at the ones using strings but I wasn't able...
  5. I need a (64 bit * 64 bit) / 64 bit calculation function.

    I'm currently using the Windows MulDiv function to do what I need but apparently, it only works for 32 bit systems.

    I'm trying to convert the size points from the screen to any given printer....
  6. Replies
    1
    Views
    4,039

    I need Windows MulDiv but for 64 bit.

    For 32 bit systems I can use the function, MulDiv to convert the screen resolution to the printer (or any device) resolution.

    For my purposes, I need to convert my computer screen's points to my...
  7. I solved this one on my own. The problem was...

    I solved this one on my own.
    The problem was that the function TextOutEx is part of the Windows gdi.
    When I 'set' the option changes in VALID_OPTIONS I needed to reset the device context so that...
  8. Revision: I'm getting the correct option values...

    Revision: I'm getting the correct option values both before and after I I set the values using DocumentProperties.
    Still, the printer completely ignores them.

    Also, I changed this line in...
  9. Thanks Salem. You've been here a *long* time and...

    Thanks Salem. You've been here a *long* time and you helped me with something unrelated to this about 4 or 5 years ago.
    The code here is real old code, not written by me. It may have worked once but...
  10. I've tried a few more things with no success. I...

    I've tried a few more things with no success.
    I changed the DocumentProperties function in VALID_OPTIONS so that it ran twice, once to input the DEVMODE object and again to retrieve it.
    I added a...
  11. How can I set windows printer configuration in c?

    I'm writing an app. in c that can print.
    This is a php 7 extension for printing in windows.
    Here is another php extension link for the newer php 7.

    I can't get certain options set which are in...
  12. Replies
    46
    Views
    12,901

    I can't tell you how much I appreciate your help...

    I can't tell you how much I appreciate your help (algorism especially).

    I finally got this thing to return a list of printer feeders in an array to the Web page.
    Again, it's PHP7 so I'm stuck...
  13. Replies
    46
    Views
    12,901

    This much worked. I kept working with it &...

    This much worked.
    I kept working with it & compiling it with more & more code.
    This works. I had to remove the free(pi2) and that stopped the HTTP 500 error.

    So, I think we're finally on to the...
  14. Replies
    46
    Views
    12,901

    This is strange. I tested it again. It returned...

    This is strange. I tested it again. It returned an HTTP 500 error.

    But - here is what was in the file:
    cbBuf: 2008
    GetPrinter succeeded
    Port: USB001
  15. Replies
    46
    Views
    12,901

    This returned an HTTP 500 error too: if...

    This returned an HTTP 500 error too:



    if (GetPrinter(resource->handle, 2, (LPBYTE)pi2, cbBuf, &cbBuf) == 0) {
    fprintf(fp, "Error: %u\n", GetLastError());
    fclose(fp);...
  16. Replies
    46
    Views
    12,901

    I get an HTTP 500 error. I've attached the file...

    I get an HTTP 500 error.
    I've attached the file & the header.
  17. Replies
    46
    Views
    12,901

    Well, I thought I was getting somewhere. I still...

    Well, I thought I was getting somewhere.
    I still can't get the port name.

    From above, this works if I replace sprintf with just a value in RETURN_STRING.
    If I use sprintf to try to access...
  18. Replies
    46
    Views
    12,901

    Thanks again for your patience. I did read the...

    Thanks again for your patience.

    I did read the info about BINNAMES but don't know how to make a string array and wasn't sure what to put into that param.

    I haven't tried your code yet but I've...
  19. Replies
    46
    Views
    12,901

    Does this work? The output is supposed to be a...

    Does this work?
    The output is supposed to be a string array.
    I don't know how to cast/convert it.



    LPTSTR *arCapabilities; //this is a pointer in Windows types...
  20. Replies
    46
    Views
    12,901

    Thanks What does this mean? (PRINTER_INFO_2 *)...

    Thanks
    What does this mean?
    (PRINTER_INFO_2 *) piBuf
  21. Replies
    46
    Views
    12,901

    I've got about 5,000 questions, which of course I...

    I've got about 5,000 questions, which of course I won't ask.
    But - what is the difference between:


    PRINTER_INFO_2 *pi2 = (PRINTER_INFO_2)piBuf;
    //and this:
    PRINTER_INFO_2 pi2 =...
  22. Replies
    46
    Views
    12,901

    Boy, I wish I knew half of what you know. How in...

    Boy, I wish I knew half of what you know.
    How in the world do you think of this stuff?

    It worked. On to the next part.
    Sadly, all I wanted was the printer's port.

    Thanks soooo much!!
  23. Replies
    46
    Views
    12,901

    Sorry, I've been trying to consolidate & try...

    Sorry, I've been trying to consolidate & try different suggestions.

    This produced an answer "GetPrinter failed!"
    It did print a file and the error code was just 0.



    FILE *fp;
    byte...
  24. Replies
    46
    Views
    12,901

    I still can't get this to work. It just throws an...

    I still can't get this to work. It just throws an HTTP 500 error.

    Unless I missed something the vars are defined & instantiated the same except the 2 that are filled by the first call (above).

    ...
  25. Replies
    46
    Views
    12,901

    I got this much to work (failed, no HTTP error)...

    I got this much to work (failed, no HTTP error) and it returned 0.
    I also tried to return the value of pcbNeeded. It returned 2004



    byte *piBuf;
    long cbBuf;
    char sRtn[1024];
    long pcbNeeded...
Results 1 to 25 of 96
Page 1 of 4 1 2 3 4