By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,994 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,994 IT Pros & Developers. It's quick & easy.

error C2065: 'Read' : undeclared identifier

P: 1
Hi,anyone.
I using VC6++ doing project to build dll from the code and the error code undeclared identifier show, any help??
I included my code here:

Expand|Select|Wrap|Line Numbers
  1. #include "stdafx.h"
  2. #include "invertframe2.h"
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. #include "string.h"
  6. #include <io.h>
  7. #include <fcntl.h>
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15.  
  16. void getWavFile() {
  17.  
  18. unsigned char rx[240];
  19. DWORD ret_bytes;
  20.  
  21. int total_frames =0;
  22.  
  23. Read(&rx[0], 1, &ret_bytes);
  24.  
  25. Read(&rx[0], 240, &ret_bytes);    
  26.  
  27. Read(&rx[0], 16, &ret_bytes);
  28.  
  29. //syncronisation with a frame
  30. Read(&rx[0], 3, &ret_bytes);
  31.  
  32. if(rx[1]==0xFF)
  33. Read(&rx[0], 1, &ret_bytes);
  34.  
  35. if(rx[2]==0xFF)
  36. Read(&rx[0], 2, &ret_bytes);
  37.  
  38. FILE *fd;
  39. FILE *deb;
  40. long i=0;
  41. int iFrame=0;
  42. int j=0;
  43. short *ptr;
  44. int count;
  45. BOOL speech=TRUE;
  46. BOOL start=FALSE;
  47. unsigned char *buff;
  48. ptr=(short*)malloc(160);
  49. buff=(unsigned char*)malloc(240);
  50. fd=fopen("raw.bin","wb+");
  51.  
  52. while(speech){
  53.     ret_bytes=0;
  54.     while(ret_bytes!=240 && speech){
  55.     Read(&buff[iFrame*240], 240, &ret_bytes);
  56.     if(ret_bytes!=240)
  57.     j++;
  58.     else{
  59.     total_frames++;
  60.     invertFrame(buff,240, count);
  61.     memcpy(ptr,buff,160);
  62.     fwrite(buff,2,80,fd);
  63.     }
  64.  
  65.     if(j==2 || total_frames == 200)                    speech=FALSE;
  66.     }
  67. }
  68.     fclose(fd);
  69.     Raw2Wav("raw1.bin","MCU_USB1.wav",8000);
  70.  
  71. }
  72.  
Thanks and Regards,
GreatSimon
Aug 15 '07 #1
Share this Question
Share on Google+
1 Reply


Banfa
Expert Mod 5K+
P: 8,916
I am not aware of any function that is called Read, did you mean to call fread?

Alternitively is it defined in another one of your source files in which case a prototype would be in order.
Aug 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.