Announcement

Collapse
No announcement yet.

help getting this API call to work

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tom Hanlin
    replied
    Code:
    pszLocalPaths AS DWORD, _
    ...because this is a pointer to an ASCIIZ, not an ASCIIZ proper.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Scott Turchin
    replied
    This is weird, Win2k with Office 2k, except Office 97 chunk of Access (O2k access is not compatable with us yet)..

    I get that it cant' find a procedure point in PIPARSE.DLL, which I had to download....
    I also had to download the WEBPOST.DLL

    Seems like it is front page chunks?

    ------------------
    Scott

    Leave a comment:


  • Wayne Diamond
    replied
    Mark, thankyou very much that's superb, invoking the wizard perfectly over here
    Ive got no idea how to use it to post a file though, other than "pszLocalPaths" there doesnt seem anywhere to specify a file to post, maybe WpPostEx is needed for that


    ------------------

    Leave a comment:


  • Mark A Owiesny
    Guest replied
    You can try this.
    Code:
    #Compile Exe "webpost.exe"
    #Include "c:\pbdll60\winapi\win32api.inc"
    Declare Function WpPost LIB "webpost.dll" Alias "WpPostA" (ByVal hWnd As Long, _
    ByVal dwNumLocalPaths As Dword, _
    pszLocalPaths As Asciiz, _
    pdwSiteNameBufLen As Dword, _
    szSiteName As Asciiz, _
    pdwDestURLBufLen As Dword, _
    szDestURL As Asciiz, _
    ByVal dwFlags As Dword) As Dword
     
    Function PbMain() As Long
    Dim hResult As Long
    hResult = WpPost(%Null, 0, "", %Null, "", %Null, "", %Null)
    STDOUT "Result = " & Str$(hResult)
    End Function


    ------------------

    Leave a comment:


  • Scott Turchin
    replied
    http://www.topqualityfreeware.com/wdll.shtml


    That's a good place to get it if not, going to play with this a bit...

    ------------------
    Scott

    Leave a comment:


  • Wayne Diamond
    started a topic help getting this API call to work

    help getting this API call to work

    Im trying to call the WpPost() function in webpost.dll, which should be on most peoples systems.
    Its just my Microsoft-documentation-to-Powerbasic translation thats stopping it from working, but I can't see why...
    Here's what I've got, which is basically finished, it just doesnt work:
    Code:
    #COMPILE EXE "webpost.exe"
    #INCLUDE "win32api.inc"
    DECLARE FUNCTION WpPost LIB "webpost.dll" ALIAS "WpPostA" (hWnd AS LONG, _
                            dwNumLocalPaths AS LONG, _
                            pszLocalPaths AS LONG, _
                            pdwSiteNameBufLen AS LONG, _
                            szSiteName AS ASCIIZ * %MAX_PATH, _
                            pdwDestURLBufLen AS LONG, _
                            szDestURL AS ASCIIZ * %MAX_PATH, _
                            dwFlags AS LONG) AS LONG
     
    FUNCTION PBMAIN() AS LONG
    DIM hResult AS LONG
    hResult = WpPost(%NULL, 0, 0, %NULL, "", %NULL, "", %NULL)
    STDOUT "Result = " & STR$(hResult)
    END FUNCTION
    Searching MSDN found several good links including http://msdn.microsoft.com/library/de...api/wppost.asp
    Here are her declarations thats I translated from:
    Code:
    DWORD WpPost(
        HWND hWnd,
        DWORD dwNumLocalPaths,
        LPTSTR *pszLocalPaths,
        LPDWORD pdwSiteNameBufLen,
        LPTSTR szSiteName,
        LPDWORD pdwDestURLBufLen,
        LPTSTR szDestURL,
        DWORD dwFlags
    );
    Example usage:
    Code:
        HRESULT hResult = NOERROR;
        LPTSTR szLocalPaths = {"c:\\MyDir"};
        hResult = WpPost(NULL, 1, &szLocalPaths, 0, NULL, 0, NULL, 0);
    Apparently if you just call NULLs instead of giving it a site/url it will pop up a wizard to ask the user for site/url etc


    ------------------
Working...
X