|
mirzamujib wrote: if u can provide me that code....
You show me yours and I, or somebody else, might show you ours!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
sory i dont get u...
kindly do help..
|
|
|
|
|
You show us what you have done so far. Not all of it, just the bit you can't get to work, together with a full explanation of how it doesn't work, error messages etc.
Then if anyone sees a problem they will probably offer some help.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Dear All,
I have a problem whle declaring input and output variable to pass a 'C' based Dll.
The Dll Api is as follows:
int rw_polling(int PortNumber,unsigned char *SelSysCode, unsigned char *IDm, unsigned char *PMm,int *Response)
Function :Send Polling Command to Card
Return :TRUE = succeeded FALSE = failed
Input :
*PortNumber : com port number (1-8)
*SelSysCode(2bytes) : systemcode of target card
Output :
*IDm(8bytes) : IDm from card
*PMm(8bytes) : PMm from card
*Response : 0 = succeeded
1 = Reader Writer is not open
2 = no response (ACK) from reader/writer
3 = check sum error of received data
10 = card is not detected
Problem:
In the above function I want to pass values of the variable
Input Variables
1) PortNumber=1
2) unsigned char *SelSysCode = 2bytes i.e FF and FF
Output variables
3)IDm (8 Bytes)
4) PMm (8 Bytes)
5) Response.
How I tried:
in Declarations:
Declare Function rw_polling Lib "RCS962INSPCT.dll" (ByVal PortNumber As Long, ByRef SelSysCode As Long, ByRef IDm As Long, ByRef PMm As Long, ByRef Response As Long) As Long
While calling through VB Form:
Dim PortNumber As Long
Dim SelSysCode(1) As Byte
Dim IDm(7) As Byte
Dim PMm(7) As Byte
Dim Response As Long
Dim ReturnCode As Long
'PortNumber = cmbComPort.ItemData(Me.cmbComPort.ListIndex)
PortNumber=1
'Here I want to pass value of 2 bytes i.e FF and FF
SelSysCode(0) = &HFF
SelSysCode(1) = &HFF
ReturnCode = rw_polling(PortNumber, VarPtr(SelSysCode(0)), VarPtr(IDm(0)), VarPtr(PMm(0)), Response)
Result: Function is returning false
Response: 10
If Response = 0 Then
pp = "succeeded"
ElseIf Response = 1 Then
pp = "Reader Writer is not open"
ElseIf Response = 2 Then
pp = "no response (ACK) from reader/writer"
ElseIf Response = 3 Then
pp = "check sum error of received data"
ElseIf Response = 10 Then
pp = "card is not detected"
End If
If ReturnCode = 0 Then
txtMsg.Text = Trim(txtMsg.Text) & vbCrLf & pp
txtMsg.Text = Trim(txtMsg.Text) & vbCrLf & "Pooling Fail"
Else
txtMsg.Text = Trim(txtMsg.Text) & vbCrLf & pp
txtMsg.Text = Trim(txtMsg.Text) & vbCrLf & "Pooling Success"
End If
What I want is:
by which way can I pass the value (FF and FF 2bytes) Input Variable for SelSysCode.
I am able to caputre the Response also.
Please anybody help me in this regarding in VB6
Ram
|
|
|
|
|
Why are you still using VB6 in 2009 ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
This is my normal reaction until one of the junior devs found out that passing a struct from C#/VB.net to a C DLL fails whereas using VBA/VB6 works . I found this so distressing I refused to have anything to do with the project.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In my company we had VB6 Apps and our main Priority was to get rig of them. and we Did, and never wanted to do anything that is related to it , i will not attempt to answer vb6 Questions , i cant remember how it is
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
hi,
i want to check printer is currently installed or not?
then one more how to check printer status?
i mean printer is busy or not..
plz help me.
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
goto start menu settings printer and faxes then lesect ur printer name thats it
Regards
Vidhish
|
|
|
|
|
hi,
i got printer name.
thx for your information.
i have one more doubt..
i have using network sharing printer.
now i am give print request. but already somebodies use same printer.
now i need status of printer is busy or not...
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Why?? The jobs will queue up on each machine until the printer is no longer busy with the previous job. Then, it'll print the next job in the queue automatically.
|
|
|
|
|
ya i no..
but i need some status of printer...
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Again, why do you need the status of the printer?? It's rare that anyone would need this.
|
|
|
|
|
|
I've asked this before, but just in case it was missed, I thought I'd ask again.
"I want to emphasize the relationship of some adjacent Cell Rows in a Column, by Drawing a 2 or 3 Pixel Line around the Group of Cells.
I read that the Microsoft DataGridView Control does not support the Individual Cell Border Style in the Current Version.
Does anyone have a routine, or suggestions that will achieve this result with the MS DataGridView Control."
Regards, Graham
|
|
|
|
|
You could use the OnPaintCell event to give them a common background colour.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thank you Henry.
If I'd wanted to know about BackColor I would have asked that question.
The question was about Drawing a line!
Regards, Graham
|
|
|
|
|
You also asked for other suggestions.
I made one.
Sorry you didn't like it, but there was no need for you to respond, if that was the case.
Good Luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I need to populate a DGV. I need to be able to index the rows of the DGV by a string variable. But I also need to have duplicate rows in the DGV. A collection allows me to index the rows the way I need to, but doesn't allow duplicate keys. Is there any other alternative?
Thanks
|
|
|
|
|
Hi,
what collection are you using?
some of them (such as List) don't care about unique items, others do (such as Dictionary which requires unique keys).
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hello,
Dim Mycollection as new collection
Are you saying I should be looking into List(of)?
Thanks!
|
|
|
|
|
you should ALWAYS use typed containers.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
if you're using a hashtable, you can make the key map to a list of items, then you can add duplicates there.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
"Make the key map to a list of item" sounds like what I want, but how?
I map my collection (maybe a hashtable) to the DGV
Each item in the collection represents a separate row in the DGV
I write to the collection through the key. Ideally, more than one row could have the same key and would all be written to in the same set.
But collections, hashtables too, require unique keys.
What am I missing?
Thanks again.
|
|
|
|
|
You could create a Dictionary< string, List< someThing>> which would map each string onto a List holding zero, one, or more objects of type someThing.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|