title: RFID Programming With VB.NET | Part III
body: <p>Now, i know a little bit about the class and how to install the COMRD800.dll driver (using command prompt : regsvr32). </p>
  
  <p>I'm using Visual Studio 2010 as my text editor, and VB.NET as my programming language.</p>
  
  <p>But here i am, another problem is chasing me again. I don't know where is my fault.</p>
  
  <p>First, i wanna explain, that when using this RF ID, there are some function to be called before writing and reading the hex key from RF ID tag.
  Here are the functions that i have to use before writing or reading.</p>
  
  <pre><code>dc_init(100,115200) 'to open the port, this should be initialized first
  dc_beep(icdev,10) 'just to make the device beeping
  dc_load_key_hex(icdev,0,0,"ffffffffffff") 'initializing the device key
  dc_request(icdev,0,tagtype) 'to get the Card Tag Type
  dc_anticoll(icdev,0,snr) 'to get the card's serial number
  dc_select(icdev,snr,sizeA) 'to get the size of the card's memory to pc (it always "8")
  dc_authentication(icdev,0,0) 'to pass the authentication
  dc_write_hex(icdev,1,TestStr) 'writing to the RF ID tag with string TestStr
  dc_read_hex(icdev,1,TestStr2) 'Nah, here is where the error occured. 
  </code></pre>
  
  <p>TestStr2 is a refference variable, in other words, the value of hex would be stored there.
  (i should print the TestStr2 to get hex value from RF ID tag)</p>
  
  <p>When the function return "0" it means "correct" or working.
  But when the function return &lt;> 0 it means "something is wrong".</p>
  
  <p>This far, they all return "0". (Except the dc_read_hex where the error existed).</p>
  
  <p>Explaining :
  Those functions came from the driver (dcrf32.dll file). To use them in my project, i must declare them in my VB.NET Module file. (in my project it's the "KoneksiRFID.vb" file).</p>
  
  <p>So far i have no problem with the functions, but when i get to the "reading" part (dc_read_hex function) i have an error.
  It said "FatalExecutionEngineError".</p>
  
  <p><a href="http://www.4shared.com/photo/MzzFTLTm/eror1.html" rel="nofollow">Images</a></p>
  
  <p>As you can see, the problem occured when i read the value.
  Here is my project if you want to participate in my problem and find a way to solve them.
  Thanks Before, for whoever tried to solve this problem. I Appreciate it so much. </p>
  
  <p><a href="http://www.4shared.com/folder/7AfphtYV/ThirdProblem.html" rel="nofollow">My Entire Project</a> (including its driver and RFID manual .pdf)</p>
  
  <p>Oh one more thing, you have to put the "driver (dcrf32.dll, dcrf32.lib,dcrf32.h) files" to your bin or windows/system32 &lt;-- i don't know if this required or not. But, just try it when the vb.net module didn't work properly.</p>