Solved

For cessi0g ... Help Me! S.O.S.

Posted on 1998-10-27
3
357 Views
Last Modified: 2013-12-03

      Thanks, dear Jorge...  Sorry! I thought "regards" was a last name  ;(
       

      Yes this is my first VxD .... I need to access a custom EISA card, under Win9x.

      Jorge,  in your sample source code, you wrote:
         
      >>   TransferData.Segment = MySegment;
      >>   TransferData.Offset = MyOffset;
      >>   TransferData.aDWord = aDwordValue;  

      Where do you get the values for the Segment/Offset?

      Also, how do I get the Segment and Offset of any given value (or from a function)?
      Then I can send them, using the DeviceIOControl function, to the VxD.
             
      Now, inside of the VxD you writte :

      >> case VXDMSG_GETINT_VECTOR:
      >>                   Get_PM_Int_Vector( INTERRUPT, &Segment, &Offset);
      >>                   lpTransferData = (LPTRANSFERDATA)lpDIOCParms->lpvOutBuffer;
      >>                   lpTransferData->Segment = Segment;
      >>                   lpTransferData->Offset = Offset;
      >>                   lpTransferData->aDWord = 0;
      >>                   return 0;

      The Get_PM_Int_vector must return the address of the number of interrupt to check
      where do you do this in your code?

      Besides, using Borland Turbo C 3.0 (16-bit), the way to access the custom card is by means of
      the INTERRUPT (void interrupt )declaration. Below is an example of source code for a timer
      associated with an interrupt. In Visual C 5.0 (32 bit) there is no INTERRUPT declaration, so how
      can I implement the interrupt service routine and related code for the interrupt-driven card, using
      Visual C 5.0?

      Please note that this task is part of my thesis work, and the final product will be used in university
      research and not for profit.

      Best regards, Jorge!  And many thanks.
      Sincerely.
      Hernan!
      power_off@usa.net



      // ***********   source Code Timer ***********
      #include <dos.h>
      #include <conio.h>
      #include <stdio.h>
      #define INTR 0x8
      #define TIMEMAX 20
      #define ALTO 119318 >>8
      #define BAJO 119318 & 255
      #ifdef __cplusplus
          #define __CPPARGS ...
      #else
          #define __CPPARGS
      #endif
      void interrupt ( *oldtiempo)(__CPPARGS);
      int count=0,segundo=0;
      void interrupt tiempo(__CPPARGS)
      {
      count++;
      if (count == 25){
            count=0;
            segundo++;
           printf("==>: %d\n",segundo);
      }
      }
      int main(void)
      {
      int vectorON,Modo;
      char ch;
      clrscr();
      vectorON= inp(0x21);
      outp(0x21,0xf9);
      oldtiempo = getvect(INTR);  
                    setvect(INTR, tiempo);
      Modo= inp(0x43);
      puts("Press any key to begin:\n");
      ch= getche();
      puts("INICIANDO CONTEO:\n");
      outp(0x43,54);
      outp(0x40,BAJO);
      outp(0x40,ALTO);
      outp(0x21,0xf8);
       while (segundo < TIMEMAX);
      outp(0x43,Modo);
      outp(0x40,0x0);
      outp(0x40,0x0);
      setvect(INTR, oldtiempo);
      outp(0x21,vectorON);
      puts("Test o.k \n");
       return 0;
       }
0
Comment
Question by:poweroff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
cessi0g earned 20 total points
ID: 1415648
poweroff,
I think you need a lot of help because this is not as trivial as you could think.
VxD's are a very hard issue to talk about here, and your specific problem could have several solutions, depending exactly on what you want to do and how far you want to go in your thesis.
We could better talk thru e-mail, ok?
Write me at jmarcosf@cajamadrid.es.

Por cierto, ¿hablas español?


0
 

Author Comment

by:poweroff
ID: 1415649
Gracias Jorge!!  
si, si hablo español ( es mi lengua nativa).

gracias por proporcionarme tu e-mail y por todas las atenciones prestadas..

atentamente tu amigo

Hernan
Merida, Yucatan Mexico.                                            
0
 
LVL 1

Expert Comment

by:orange_juice
ID: 4727909
where can i start on developing a VXD?

any website....?etc?

i'm a master student in EE
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question