View previous topic :: View next topic |
Author |
Message |
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Oct 16, 2003 2:01 am Post subject: |
|
|
...
MarkTrubo wrote: |
1) This dll is very cool -- if you remember way back, I was having memory leak problems and looks like this will handle it! Yeaaaah -- finally a solution after having to do silly work arounds for years!!
|
LOL, so you been asleep since March (when the 7k version
came out)?
MarkTrubo wrote: |
2) So, with the external dll stuff, any idea how to grab info from TAPI? Just something I've been dying for for like 3 years.
|
Actually I have no idea if VDSug could do that or not, I've
never used TAPI and have no clue - sorry. _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Last edited by Mac on Sat Nov 15, 2003 6:57 pm; edited 2 times in total |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Thu Oct 16, 2003 2:49 am Post subject: |
|
|
MarkTrubo wrote: | So, with the external dll stuff, any idea how to grab info from TAPI? |
No I don't think so. TAPI requires complex structures to be defined, have custom callback functions etc which is not possible in vdsug. In VDS 5 may ???? be possible partially atleast after greatest difficulty. Even in a structured language this drives people nuts ..
BTW what TAPI functionality are U looking for beyond dialing phone
? Autodetection of all the available port and settings
? Detect connection status
? ability to autodial and autosend files over the phone
? Answering machine
I think U know VB if so that may be the easiest way to go. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Oct 18, 2003 9:03 am Post subject: VDSUG.DLL versioned release uploaded at VDSworld... |
|
|
Latest version of VDSug.dll:
http://www.trinex.net/users/mac/vdsug/
VDSug.dll is under 30k - the larger zip file includes examples and
help files in both TXT and HLP formats.
Many thanks to Dr. Dread, SnarlingSheep, Moke, and Codescript
for their help with this project.
Features include:
- SAVEFILE (no memory leak in visible lists)
- MOUSEDOWN (very stable)
- GETPIXEL (get RRGGBB value of any pixel on your screen)
- FILE IO (many features)
- NON-VDS DLL access (up to 20 parameters)
- DRAW commands (all features from the DRAW3.DLL and more)
- MENU commands/functions ("check" and "enable/disable" features)
- and more...
Also, there is now a file to check for new posts at the
Mclain Software forums. We'll try to post VDS code
(or an EXE) at the forum to auto-check it in a few days.
More details at this link:
http://www.mclainsoftware.us.tt/cgi-bin/ikonboard/announcements.cgi _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Last edited by Mac on Sat Nov 15, 2003 6:56 pm; edited 1 time in total |
|
Back to top |
|
|
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Sat Oct 18, 2003 11:40 am Post subject: |
|
|
CodeScript wrote: | MarkTrubo wrote: | So, with the external dll stuff, any idea how to grab info from TAPI? |
No I don't think so. TAPI requires complex structures to be defined, have custom callback functions etc which is not possible in vdsug. In VDS 5 may ???? be possible partially atleast after greatest difficulty. Even in a structured language this drives people nuts ..
BTW what TAPI functionality are U looking for beyond dialing phone
? Autodetection of all the available port and settings
? Detect connection status
? ability to autodial and autosend files over the phone
? Answering machine
I think U know VB if so that may be the easiest way to go. |
VB would be the way to go, but I'm no VB master. I'm using an open phone system called Televantage for a number of businesses that work out of one physical address. Need to pull some info on inbound calls, like the DID (toll free number that was called from the outside world into our office -- there are quite a few -- diff num = diff. business or diff. promo offer, etc.), caller ID, do so look up stuff with that info, do some screen pops, detect end of call, etc. All the call routing and what not is handled by Televantage, but I just need to pull some info to make the agent's lives easier.
I have a solution in place, but it is fairly limiting and I'd like to have more control over it.
P.S. I know Mac, I've been sleeping... I think I'm almost back awake though! Oh, and nice to see you back too. BTW - Does your new whole web site and all indicate you moved on beyond Win 95 at home? Did you finally get high sped internet out in the boonies? Hope so!! |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Oct 18, 2003 4:12 pm Post subject: |
|
|
MarkTrubo wrote: |
BTW - Does your new whole web site and all indicate you
moved on beyond Win 95 at home?
|
LOL, in yer dreams...
Quote: |
Did you finally get high sped internet out in the boonies? Hope so!! |
Only in my dreams... still on high speed (yeah, right) 28k... _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Dec 04, 2004 10:00 pm Post subject: |
|
|
Updated the API_FLAGS.ZIP text file that has decimal values
for API messages and flags such as BM_CLICK = 245, etc.
There are now 21,000+ values (up from 15,000+) in the
text file (some may not apply to VDSug.dll use).
VDS 5 users may also find this info useful when using non-VDS
DLLs (with or without VDSug.dll).
Download api_flags.zip (156kb) at the VDSug.dll page:
http://www.trinex.net/users/mac/vdsug/index.html
Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Last edited by Mac on Sun Dec 05, 2004 7:02 pm; edited 1 time in total |
|
Back to top |
|
|
Boo Valued Contributor
Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sat Dec 04, 2004 10:01 pm Post subject: |
|
|
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Dec 05, 2004 5:17 pm Post subject: |
|
|
Thanks Mac _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
hotwire Newbie
Joined: 30 Jan 2005 Posts: 6
|
Posted: Mon Jan 31, 2005 8:26 am Post subject: |
|
|
Is there anyway to make a pointer to a file buffer? The I could write arbitrary data into and use cool functions like:
Code: |
%E = @lib(WININET,HttpSendRequestA,int:,%%http_request,nil:,0,!BUFFER_POINTER!,%%BUFFER_SIZE)
|
|
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 31, 2005 9:07 am Post subject: |
|
|
Yes.
Initialize a variable to make a buffer using @fill, then specify its address in the @lib call using @addr, remembering to put the variable name in quotes so that @addr receives the variable name not its contents. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
hotwire Newbie
Joined: 30 Jan 2005 Posts: 6
|
Posted: Mon Jan 31, 2005 9:48 am Post subject: |
|
|
I'm not entirely sure I understand. I was thinking more along the lines of the vdsug.dll which has it's own internal buffer.
Actually, the problem I'm beating my self against the wall with is when I try to load a binary file (sound.wav for example) using:
Code: |
%3 = sound.wav
%%bufsize = @UG(FILEREADBUFSIZE, @file(%3, Z))
if @not(@equal(%%bufsize,@file(%3,Z)))
INFO error - buffer size
end
UG FILEOPEN, 1, %3, READ
UG FILEREAD, 1, RAWDATA, @file(%3, Z)
%%http_sb = @UG(FILEREAD,1,RAWDATA,@file(%3,Z))@cr()@lf()
UG FILECLOSE, 1
|
The resulting "string" is basically hosed. From what I understand it has something do to with VDS thinking chr(0) is a string terminator. EEK!
I'm working on an automatic uploader (http post) for a world of warcraft data file. This binary problem is the last technical piece I need to work out. |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 31, 2005 11:18 am Post subject: |
|
|
Okay. I see what you mean.
The @fill() function creates a variable of the length specified, which can be used as a buffer, but if the variable is used by VDS, it will be treated as a string and any null character will be treated as the end of it. VDS was never designed to be able to work with binary data and the @lib() and other functions that can be used for API access were included to allow limited API access for relatively simple functions where having to create a DLL extension is a bit of an inconvenience. For more complex things it is not only better, but usually a hell of a lot easier, to create an extension in C or Delphi and call it from the VDS program.
Having said that, if you can get data into a buffer by passing its address to an API function using @addr("%B") you should be able to write it out again passing the same address without truncation. Only if you use the value of this buffer (by specifying %B by itself) will VDS treat it as a string and truncate it at the first null character.
I don't know what @UG does, but I think that basically the problem is you cannot assign binary data (%% var = whatever) because of the null characters. If you used the API I/O functions via the @lib() command then you would not have this problem because the buffer would always be referred to as an address in one of the arguments to the API call and VDS will never look at the contents of this buffer and try to treat it as a null terminated string. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Jan 31, 2005 8:07 pm Post subject: |
|
|
Hey hotwire,
Well, I'm not exactly sure of your goal here...
VDSug can load binary files using a null replacement char (it
replaces all the nulls with a char of your choice), but it cannot
be a char in the original file, or when you convert it back it will
turn the original chars to nulls as well.
Plus, the file is basically worthless until the null chars are put
back in - so sending the file in this state (no nulls) is gonna
be useless unless it will be converted back somewhere.
VDSug can write data directly to binary files though.
Is there a reason ya can't upload the file (as a file) rather than
send it from memory (as a var)?
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
hotwire Newbie
Joined: 30 Jan 2005 Posts: 6
|
Posted: Wed Feb 02, 2005 9:58 am Post subject: |
|
|
I am trying to use wininet to do an http form post. Actually, it works just fine, but the file ends up corrupt because of the null issue. Unless I am mistaken, the only way is to create the header in a buffer/var, add the file to the buffer/var, then add the footer. Maybe if I could do all this in the clipboard or a non-vds buffer then create a pointer to the buffer... hmm... Below is some of the code I wrote to test this out, it might give you an idea of what it is suppose to do. (yes I know there are bugs in the logic, but I'm just trying to get uploads working !!)
Just place the code below in a file, and include it in another project... the sequence for attempting an upload is:
INET INIT
INET OPEN
HTTP CONNECT,www.aoeguild.com
HTTP OPEN,POST,/test.php
HTTP PREPAREPOST
HTTP ADDFILE,upload_file,sound.wav
HTTP SENDREQUEST
Code: |
#DEFINE command,HTTP
#DEFINE function,HTTP
#DEFINE command,INET
#DEFINE function,INET
#DEFINE function,SRAND
#DEFINE command,KERROR
#DEFINE function,STR_REPEAT
# Defaults
%%_inet_init = 0
%%__KERNEL32_DLL = 0
%%__USER32_DLL = 0
%%__WININET_DLL = 0
:SRAND
RANDOM @datetime(ssnn)
REPEAT
%R = %R@RANDOM(1,9)
UNTIL @equal(@len(%R),%1)
exit %R
:HTTP
goto HTTP_%1
:INET
goto INET_%1
:INET_INIT
if @zero(%%_inet_init)
if @zero(%%__KERNEL32_DLL)
LOADLIB KERNEL32
%%__KERNEL32_DLL = 1
end
if @zero(%%__USER32_DLL)
LOADLIB USER32
%%__USER32_DLL = 1
end
if @zero(%%__WININET_DLL)
LOADLIB WININET
%%__WININET_DLL = 1
end
%%_inet_init = 1
%V = @binary(dword,0)@binary(dword,0)
%U = @binary(dword,@len(%V))
if @lib(WININET,InternetQueryOptionA,bool:,0,40,@addr("%V"),@addr("%U"))
%%_inet_ver = @val(@substr(%V,1,4)).@val(@substr(%V,5,)
end
else
warn "Inet already initialized"
exit
end
exit @ok()
:INET_DESTROY
if @not(@zero(%%_inet_init))
if @not(@zero(%%http_request))
%E = @lib(WININET,InternetCloseHandle,bool:,%%http_request)
end
if @not(@zero(%%http_session))
%F = @lib(WININET,InternetCloseHandle,bool:,%%http_session)
end
if @not(@zero(%%inet_conn))
%G = @lib(WININET,InternetCloseHandle,bool:,%%inet_conn)
end
if @not(@zero(%%__KERNEL32_DLL))
FREELIB KERNEL32
end
if @not(@zero(%%__USER32_DLL))
FREELIB USER32
end
if @not(@zero(%%__WININET_DLL))
FREELIB WININET
end
end
exit
:INET_OPEN
%%inet_conn = @lib(WININET,InternetOpenA,int:,nil:,0,nil:,nil:,0)
if @zero(%%inet_conn)
warn "InternetOpen failed"
exit
end
exit @ok()
:INET_CHECK
%M = @BINARY(DWORD,0)
%L = @LIB(wininet,InternetGetConnectedState,BOOL:,@ADDR("%M"),0)
if @zero(%L)
warn "Your Internet connection is unavailable!"
exit
end
exit @ok()
#%Z = @lib(WININET,InternetAttemptConnect,int:,0)
:HTTP_CONNECT
%%http_session = @lib(WININET,InternetConnectA,int:,%%inet_conn,str:%2,0,nil:,nil:,3,0,1)
if @zero(%%http_session)
KERROR WARN
exit
end
exit @ok()
:HTTP_OPEN
%%http_request = @lib(WININET,HttpOpenRequestA,int:,%%http_session,str:%2,str:%3,nil:,nil:,0,int:$400000,0)
if @zero(%%http_request)
KERROR WARN
exit
end
exit @ok()
:HTTP_ADDHEADERS
%T = %2@cr()@lf()
%U = @len(%T)
%%http_headers = @lib(WININET,HttpAddRequestHeadersA,bool:,%%http_request,@ADDR("%T"),int:%U,int:$20000000)
if @zero(%%http_headers)
KERROR WARN
exit
end
exit @ok()
:HTTP_GENERATEBOUNDARY
%%http_boundary = @ENCRYPT(@SRAND(10),MD5)
exit @ok()
:HTTP_PREPAREPOST
# For now, we just assume %2 is FILE and %3 is the filename
# This should be improved to support real multipart posts
HTTP GENERATEBOUNDARY
HTTP ADDHEADERS,Content-Type: multipart/form-data; boundary=%%http_boundary
%%http_sb =
exit @ok()
:HTTP_ADDFILE
%B = Content-Disposition: form-data; name=@chr(34)%2@chr(34); filename=@chr(34)%3@chr(34)
%C = Content-Type: application/octet-stream
%%http_sb = %%http_sb--%%http_boundary@cr()@lf()
%%http_sb = %%http_sb%B@cr()@lf()%C@cr()@lf()@cr()@lf()
%%bufsize = @UG(FILEREADBUFSIZE, @sum(@file(%3, Z),1))
if @not(@equal(%%bufsize,@sum(@file(%3,Z),1)))
INFO error - buffer size
end
%%FILESIZE = @file(%3, Z)
UG FILEOPEN, 1, %3, READ
UG FILEREAD, 1, RAWDATA, %%FILESIZE
%Y = @UG(FILEREAD,1,RAWDATA,@file(%3,Z))
%%http_sb = %%http_sb%Y@cr()@lf()--%%http_boundary--@cr()@lf()
UG FILECLOSE, 1
exit @ok()
:HTTP_SENDREQUEST
if @not(@zero(%%http_sb))
%Y = %%http_sb
%Z = @len(%%http_sb)
%%http_send = @lib(WININET,HttpSendRequestA,int:,%%http_request,nil:,0,@ADDR("%Y"),%Z)
else
%%http_send = @lib(WININET,HttpSendRequestA,int:,%%http_request,nil:,0,nil:,0)
end
if @zero(%%http_send)
KERROR WARN
exit
end
exit @ok()
:STR_REPEAT
%I = 0
REPEAT
%R = %R%1
%I = @SUM(%I,1)
UNTIL @equal(%I,%2)
exit %R
:KERROR
goto KERROR_%1
:KERROR_WARN
%e = @lib(KERNEL32,GetLastError,int:)
%p = @fill(256,,Z)
if @equal(@GREATER(%e,11999),@GREATER(12175,%e))
%f = @lib(KERNEL32,GetModuleHandleA,int:,str:wininet.dll)
%r = @lib(KERNEL32,FormatMessageA,int:,int:$800,%f,int:%e,int:0,@ADDR("%p"),int:255,int:0)
else
%r = @lib(KERNEL32,FormatMessageA,int:,int:$1000,int:0,int:%e,int:0,@ADDR("%p"),int:255,int:0)
end
warn (%e) %p
exit
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|