473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can some explain plz. Basic uses a C++ wrapper.

I have recently purchased an aspi wrapper control for vb.

I haven't had much experience with hex and memory addresses and that's my
problem.

The piece of code that baffles me is:

With ASPI1
.HostAdapter = 0
.SCSIID = 4
.CDBSize = 10 'LINE 1
.CDB = Chr$(&H5A) & Chr$(0) & Chr$(0) & Chr$(0) & Chr$(0) & Chr$(0) &
Chr$(0) & Chr$(0) & Chr$(0) & Chr$(0) 'LINE 2
.Execute

End With

Print "SENSE BUFFER: " & ASPI1.SenseBuffer

The first line sends a command of 10 bytes I know. What is CHR$ doing. I
know that it returns the ascii char for the character, but how does that fit
in with the command descriptor block. How does the translation work.

The second line specifies the length of the command that is going to be
sent. I know that.

Anyhow i have pasted the scsi2 spec for a 10 byte command here:

http://www.intermouse.net/aspimodeselect10.htm
for reference.

So,

I need to figure out how to translate the scsi2 commands into the wrapper
function. Line 1.

If anyone knows what I am rambling about, I would very much appreciate some
help.

Mucho thanko.

Mark

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 22 '05 #1
28 1642
Your question hasn't anything to do with C, as far as I see...
Jul 22 '05 #2
The ocx was written in C++.

"jacob navia" <ja***@jacob.remcomp.fr> wrote in message
news:ce**********@news-reader1.wanadoo.fr...
Your question hasn't anything to do with C, as far as I see...



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 22 '05 #3
Intermouse wrote:
The ocx was written in C++.

"jacob navia" <ja***@jacob.remcomp.fr> wrote in message
news:ce**********@news-reader1.wanadoo.fr...
Your question hasn't anything to do with C, as far as I see...


1. Don't top-post.
2. Don't forget to post to an assembly group because part
of the Windows operating system was written in assembly.
3. Just to be safe, you may want to also post to the Pascal
and C newsgroups just to cover all bases.

When you have an issue involving the syntax or semantics
of a language, post to a language newsgroup. When you
have issues with an operating system or platform, post
to a platform specific newsgroup.
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #4
In message <41**********@127.0.0.1>, Intermouse
<ma**@nospam.intermouse.co.uk> writes

[please don't top-post]
"jacob navia" <ja***@jacob.remcomp.fr> wrote in message
news:ce**********@news-reader1.wanadoo.fr...
Your question hasn't anything to do with C, as far as I see...
The ocx was written in C++.


"OCX" means it uses a language-neutral binary interface. No C++ visible.

--
Richard Herring
Jul 22 '05 #5
Intermouse wrote:
The ocx was written in C++.


Minesweeper was written in C++. Should I post minesweeper questions here?
Jul 22 '05 #6
While you may not care for top-posting, others such as myself find it much
easier to read.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:4l*************@newssvr33.news.prodigy.com...
: Intermouse wrote:
: > The ocx was written in C++.
: >
: > "jacob navia" <ja***@jacob.remcomp.fr> wrote in message
: > news:ce**********@news-reader1.wanadoo.fr...
: >
: >>Your question hasn't anything to do with C, as far as I see...
:
: 1. Don't top-post.
: 2. Don't forget to post to an assembly group because part
: of the Windows operating system was written in assembly.
: 3. Just to be safe, you may want to also post to the Pascal
: and C newsgroups just to cover all bases.
:
: When you have an issue involving the syntax or semantics
: of a language, post to a language newsgroup. When you
: have issues with an operating system or platform, post
: to a platform specific newsgroup.
:
:
: --
: Thomas Matthews
:
: C++ newsgroup welcome message:
: http://www.slack.net/~shiva/welcome.txt
: C++ Faq: http://www.parashift.com/c++-faq-lite
: C Faq: http://www.eskimo.com/~scs/c-faq/top.html
: alt.comp.lang.learn.c-c++ faq:
: http://www.raos.demon.uk/acllc-c++/faq.html
: Other sites:
: http://www.josuttis.com -- C++ STL Library book
:

Jul 22 '05 #7
I know this is a repeat, but... > > > Your question hasn't
personally, I like to "side post"; > > > anything to do with C,
that way, those reading the thread > > > as far as I see...
can read my answer and follow > >
along with the original text. Of > > 1. Don't top-post.
course, this takes a little more >
arranging the original thread; but, > While you may not care for
as you can see, it makes for a > top-posting, others such as
much better reading experience. > myself find it much easier to
<g> > read

Rick
Jul 22 '05 #8
Wow.

It seems that some people spend their time replying to posts just to tell
others that they posted the message wrong or in the wrong place. Are we all
message group mediators, or are we really trying to help each other?

Top post, side post, over the post, who cares as long as the message reaches
the far corners of the earth and hopefully gets some REAL answers.

Thanks for all of your much appreciated......err.........postings!!!

Mark

"red floyd" <no*****@here.dude> wrote in message
news:%x***************@newssvr27.news.prodigy.com. ..
Intermouse wrote:
The ocx was written in C++.


Minesweeper was written in C++. Should I post minesweeper questions here?



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 22 '05 #9
Intermouse wrote:

Wow.

It seems that some people spend their time replying to posts just to tell
others that they posted the message wrong or in the wrong place. Are we all
message group mediators, or are we really trying to help each other?


As for comp.lang.c++:
You are free to leave if the rules of the group are unacceptable to you.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 22 '05 #10
Concur. I hate having to scroll to the bottom of every message to see what may or may not be some profound response.

"Randy Birch" <rg************@mvps.org> wrote in message news:vw***************@news04.bloor.is.net.cable.r ogers.com...
While you may not care for top-posting, others such as myself find it much
easier to read.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:4l*************@newssvr33.news.prodigy.com...
: Intermouse wrote:
: > The ocx was written in C++.
: >
: > "jacob navia" <ja***@jacob.remcomp.fr> wrote in message
: > news:ce**********@news-reader1.wanadoo.fr...
: >
: >>Your question hasn't anything to do with C, as far as I see...
:
: 1. Don't top-post.
: 2. Don't forget to post to an assembly group because part
: of the Windows operating system was written in assembly.
: 3. Just to be safe, you may want to also post to the Pascal
: and C newsgroups just to cover all bases.
:
: When you have an issue involving the syntax or semantics
: of a language, post to a language newsgroup. When you
: have issues with an operating system or platform, post
: to a platform specific newsgroup.
:
:
: --
: Thomas Matthews
:
: C++ newsgroup welcome message:
: http://www.slack.net/~shiva/welcome.txt
: C++ Faq: http://www.parashift.com/c++-faq-lite
: C Faq: http://www.eskimo.com/~scs/c-faq/top.html
: alt.comp.lang.learn.c-c++ faq:
: http://www.raos.demon.uk/acllc-c++/faq.html
: Other sites:
: http://www.josuttis.com -- C++ STL Library book
:

Jul 22 '05 #11
In message <10*************@corp.supernews.com>, Norm Cook
<no************@cableone.net> writes

"Randy Birch" <rg************@mvps.org> wrote in message
news:vw***************@news04.bloor.is.net.cable. rogers.com...
"Thomas Matthews" <Th****************************@sbcglobal.net> wrote in
message news:4l*************@newssvr33.news.prodigy.com...
: Intermouse wrote:
: > The ocx was written in C++.
:
: 1. Don't top-post.
:
While you may not care for top-posting, others such as myself find it much
easier to read.
Concur. I hate having to scroll to the bottom of every message to see
what may or may not be some profound response.


Then _trim_ the junk. Just keep enough to maintain sequence and context.

See?

--
Richard Herring
Jul 22 '05 #12
See what i mean!!! LOL

"Karl Heinz Buchegger" <kb******@gascad.at> wrote in message
news:41***************@gascad.at...
Intermouse wrote:

Wow.

It seems that some people spend their time replying to posts just to tell others that they posted the message wrong or in the wrong place. Are we all message group mediators, or are we really trying to help each other?


As for comp.lang.c++:
You are free to leave if the rules of the group are unacceptable to you.

--
Karl Heinz Buchegger
kb******@gascad.at



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 22 '05 #13
Randy Birch wrote:

While you may not care for top-posting, others such as myself find it much
easier to read.

See what happens when stuff is cross-posted to a BASIC newsgroup?
Nothing good.

<thread plonk>
Brian Rodenborn
Jul 22 '05 #14
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message news:<S9********************@comcast.com>...
I know this is a repeat, but... > Side-posting is definitely
personally, I like to "side post"; > better than top-posting but
that way, those reading the thread > unfortunately you chose to
can read my answer and follow > left-post when any rational
along with the original text. Of > person would naturally
course, this takes a little more > right-post.
arranging the original thread; but,
as you can see, it makes for a
much better reading experience.
<g>
Rick


<bgdr>
Jul 22 '05 #15
"Randy Birch" <rg************@mvps.org> wrote in message
news:vw***************@news04.bloor.is.net.cable.r ogers.com...
While you may not care for top-posting, others such as myself find it much
easier to read.


So what?! Who the fuck are YOU, asshole?!
Jul 22 '05 #16
<LOL>

--

Randy

"Mabden" <mabden@sbc_global.net> wrote in message
news:6D****************@newssvr27.news.prodigy.com ...
: "Randy Birch" <rg************@mvps.org> wrote in message
: news:vw***************@news04.bloor.is.net.cable.r ogers.com...
: > While you may not care for top-posting, others such as myself find it
much
: > easier to read.
:
: So what?! Who the fuck are YOU, asshole?!
:
:

Jul 22 '05 #17

"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:S9********************@comcast.com...
R | I know this is a repeat, but... > > > Your question hasn't
O | personally, I like to "side post"; > > > anything to do with
C,
F | that way, those reading the thread > > > as far as I see...
L | can read my answer and follow > >
M | along with the original text. Of > > 1. Don't top-post.
A | course, this takes a little more >
O | arranging the original thread; but, > While you may not care for
| as you can see, it makes for a > top-posting, others such
as
| much better reading experience. > myself find it much easier
to
| <g> > read
|
| Rick

Jul 22 '05 #18
On Tue, 27 Jul 2004 18:52:15 -0700, "Steve Gerrard"
<no*************@comcast.net> wrote:

"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:S9********************@comcast.com...
R | I know this is a repeat, but... > > > Your question hasn't
O | personally, I like to "side post"; > > > anything to do with
C,
F | that way, those reading the thread > > > as far as I see...
L | can read my answer and follow > >
M | along with the original text. Of > > 1. Don't top-post.
A | course, this takes a little more >
O | arranging the original thread; but, > While you may not care for
| as you can see, it makes for a > top-posting, others such
as
| much better reading experience. > myself find it much easier
to
| <g> > read
|
| Rick

Bloody left posters...

As for the OP's question and hopefully to end this silly thread.

With ASPI1
.HostAdapter = 0
.SCSIID = 4
.CDBSize = 10 'LINE 1
.CDB = Chr$(&H5A) & Chr$(0) & Chr$(0) & Chr$(0) & Chr$(0) &
Chr$(0) &
Chr$(0) & Chr$(0) & Chr$(0) & Chr$(0) 'LINE 2
.Execute

ASPI1 is a class, object whatever..
That first line simply sets the number of characters that it will
send, just as the previous lines set the adapter number and the ID to
send it to/with.
Chr$() gives you an ASCII character, .CDB = chr$(x) & chr$(x) and so
on, simply builds a byte array or string(call it what you like) with
the characters added on one by one.
So if you send chr$(65) & chr$(66) & chr$(67), then your output would
be "ABC". Which would be identical if you had done .CBD = "ABC".

Clear ?

<followup set to CLBVM>

--

Regards, Frank
Jul 22 '05 #19
On Wed, 28 Jul 2004 00:15:35 GMT, "Randy Birch"
<rg************@mvps.org> wrote:
<LOL>


Not funny.

Applying Kill Filter now, (Action=Delete) for Author: Mabden
_______________________
Michael B. Johnson
Jul 22 '05 #20
"Michael B. Johnson" <mj******@veribox.net> wrote in message
news:t7********************************@4ax.com...

Applying Kill Filter now, (Action=Delete) for Author: Mabden


So what?! Who the fuck are YOU, asshole?!
Jul 22 '05 #21
> > Applying Kill Filter now, (Action=Delete) for Author: Mabden

So what?! Who the fuck are YOU, asshole?!


Apparently, someone with a lot more brains than you.

Oh yeah, you can skip posting your broken-record response to my comment.
Let's assume I already know you were going to do that and let it go at
that.

Rick

Jul 22 '05 #22

H Haven't any of you ever read "Gulliver's Travels"?
a
v "Richard Herring" <ju**@[127.0.0.1]> wrote in message
news:tK**************@baesystems.com...
e " > In message <10*************@corp.supernews.com>, Norm Cook
n G > <no************@cableone.net> writes
' u > >
t l > >"Randy Birch" <rg************@mvps.org> wrote in message
l > >news:vw***************@news04.bloor.is.net.cable. rogers.com...
a i > >> "Thomas Matthews"
<Th****************************@sbcglobal.net> wrote in
n v > >> message news:4l*************@newssvr33.news.prodigy.com...
y e > >> : Intermouse wrote:
r > >> : > The ocx was written in C++.
o ' > >> :
f s > >> : 1. Don't top-post.
:

y T > >> While you may not care for top-posting, others such as myself
find it much
o r > >> easier to read.
u a >
v > >Concur. I hate having to scroll to the bottom of every message
to see
e e > >what may or may not be some profound response.
v l >
e s > Then _trim_ the junk. Just keep enough to maintain sequence and
context.
r " >
? > See?
r >
e > --
a > Richard Herring
d
Haven't any of you ever read "Gulliver's Travels"?
Jul 22 '05 #23
In message <Bf****************@fe2.texas.rr.com>, Leslie A Rhorer
<lr*****@satx.rr.com> writes
Haven't any of you ever read "Gulliver's Travels"?


The Lilliputians didn't have the benefit of the fine c.l.c++ FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.4
--
Richard Herring
Jul 22 '05 #24
On Fri, 30 Jul 2004 11:19:06 +0100, Richard Herring <ju**@[127.0.0.1]>
wrote:
In message <Bf****************@fe2.texas.rr.com>, Leslie A Rhorer
<lr*****@satx.rr.com> writes
Haven't any of you ever read "Gulliver's Travels"?


The Lilliputians didn't have the benefit of the fine c.l.c++ FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.4


LOL!

But seriously, if you've been following a thread and your news reader
provides this threading capability to you, wouldn't you have the
context /already/ in mind when someone top posts?

But...enough already, I suppose.
_______________________
Michael B. Johnson
Jul 22 '05 #25
"Michael B. Johnson" <mj******@veribox.net> wrote in message
news:8o********************************@4ax.com...
. . . if you've been following a thread and your news reader
provides this threading capability to you, wouldn't you have
the context /already/ in mind when someone top posts?


Depends. I usually have my messages grouped by thread, but I also set it to
hide "read" messages (much easier to deal only with new ones). So often a
message can arrive that deals with a thread a few days old or more and I
find it really useful to have just two or three lines at the top containing
a very brief outline of the appropriate part of the subject matter. This is
particularly useful when a thread deals with multiple questions and the
newly arrived post deals with only part of the answer. The only thing I
really don't like is when the "top post" message contains the entire
original post (and often a lot more besides) and you have to wade through
lots and lots of stuff just to get to the current post. If I have to scroll
through more than a dozen or so lines of top post I usually go no further
and ignore the post completely (unless it is something I am particularly
interested in). It's a matter of personal preference, of course, but I like
newsgroup messages (and women!) to have at least a little bit at the top ;-)

Mike

Jul 22 '05 #26
On Fri, 30 Jul 2004 19:16:27 +0100, "Mike Williams"
<Mi**@WhiskyAndCoke.com> wrote:
"Michael B. Johnson" <mj******@veribox.net> wrote in message
news:8o********************************@4ax.com.. .
. . . if you've been following a thread and your news reader
provides this threading capability to you, wouldn't you have
the context /already/ in mind when someone top posts?


Depends. I usually have my messages grouped by thread, but I also set it to
hide "read" messages (much easier to deal only with new ones). So often a
message can arrive that deals with a thread a few days old or more and I
find it really useful to have just two or three lines at the top containing
a very brief outline of the appropriate part of the subject matter.


<snip>

I have a similar problem, quite often the reply to an original post
turns up well before I get the 'question'

If the replier has over assiduosly snipped the question, then I find
myself having to 'guess the question' from the answer
- it can be annoying

But it can be just as annoying getting 200 lines of previous posts,
and just
'Thanks'

at the end.
Jul 22 '05 #27

"Michael B. Johnson" <mj******@veribox.net> wrote in message
news:8o********************************@4ax.com...
On Fri, 30 Jul 2004 11:19:06 +0100, Richard Herring <ju**@[127.0.0.1]>
wrote:
In message <Bf****************@fe2.texas.rr.com>, Leslie A Rhorer
<lr*****@satx.rr.com> writes
Haven't any of you ever read "Gulliver's Travels"?
The Lilliputians didn't have the benefit of the fine c.l.c++ FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.4


LOL!


I thought the thread deviation was worth a chuckle, and hopefully not
offensive to anyone.
But seriously, if you've been following a thread and your news reader
provides this threading capability to you, wouldn't you have the
It depends on how complex the thread is, and how closely the posters
stick to it. <cough>
context /already/ in mind when someone top posts?

But...enough already, I suppose.
OK. Actually, one of my favorite methods of reply posting is as you see
here. I especially employed it back in the old FIDONet days when debating
in political fora or responding in the Tech or Science echoes. I would
delete the chaff, and respond to each point in a separate section.
_______________________
Michael B. Johnson


Leslie A Rhorer :-)
Jul 22 '05 #28
stu
On Tue, 27 Jul 2004 01:52:33 -0400, "Rick Rothstein"
<ri************@NOSPAMcomcast.net> wrote:
I know this is a repeat, but... > > > Your question hasn't
personally, I like to "side post"; > > > anything to do with C,
that way, those reading the thread > > > as far as I see...
can read my answer and follow > >
along with the original text. Of > > 1. Don't top-post.
course, this takes a little more >
arranging the original thread; but, > While you may not care for
as you can see, it makes for a > top-posting, others such as
much better reading experience. > myself find it much easier to
<g> > read

Rick


aaaaH, aaaaH, aaaaH!

!Right group posters dysfunctional the is This

"Putting the fun back in Dysfunctional since 1957" (tm)(r)(c)
Jul 22 '05 #29

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
3
by: Gary Smith | last post by:
Aloha, I'm having a problem with floated divs in msie 6. I've created a demo page that illustrates the problem. (http://kvb.tsu.biz/test.html). On that page is a div wrapper with a green...
5
by: john | last post by:
I searched http://www.sellsbrothers.com. and could not find anything about this subject. How do I make C# User Controls Visible to Visual Basic 6.0 Applications? Thanks, John
4
by: 0to60 | last post by:
I'm trying to create a .dll with VS.NET 2003 Architect that contains a math computational component. I need the guts of the thing to be in native code, as performance is key for that part. But, I...
118
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI class where we had to use Lisp, and I absolutely...
3
by: geekworx | last post by:
I have a .NET managed C++ application that needs to call a 3rd party dll that was built with VC6 and returns MFC types. e.g. int GetSomeStrings(CStringArray *pStringArray); The problem I'm...
5
by: Petded | last post by:
Hi, can anyone explain to me why vc++ managed use this s= gcnew Socket( AddressFamily::InterNetwork,SocketType::Stream,ProtocolType::Tcp ); whereas c# use this
0
by: dataguy | last post by:
I have my developers explaining the stored procedures that they write using visual studio. These stored procedures are for DB2 os390. In one case, one of the developers has defined a global...
18
by: Jon Slaughter | last post by:
"Instead of just waiting for its time slice to expire, a thread can block each time it initiates a time-consuming activity in another thread until the activity finishes. This is better than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.