|
|
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Есть програмуля, которая работает в Debug версии, но не хочет работать в Relase версии. В програмули осуществляется вызов внешней функции: int ii,rc=0; char bufferp[810]; if ((rc=d42_display(dxinfo[channum].chdev,&bufferp[0]))=-1) {//Ошибка } Внешняя функция должна в буфер <bufferp> записать данные Но Windows ругается...говорит что: Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу 0x0000018. Память не может быть "written". Это по всей видимости из-за прибамбасов Windows ... и взаимодейстия различных процессов. Не посоветуете, как это обойти. С уважением, Змеюся. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 15:25 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Описание функции d42_display ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 16:14 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Name: int d42_display(devh, bufferp) Inputs: int devh channel descriptor char *bufferp pointer to an application buffer. The buffer will contain display data for the selected channel. Returns: ED42_NOERROR -1 if success Includes: D42LIB.H Mode: synchronous Supports: D/42-SL, D/42-SX, D/42-NS, D/42-NE2 Description The d42_display( ) function retrieves the current LCD/LED display (alphanumeric) data and places it in an application buffer. The application buffer must be 49 bytes, and will hold the entire data string (see below) plus a NULL character. The length of the data string is variable. Byte 0 of the display data corresponds to the top, left-most display element. The display data is stored as a null-terminated ASCII string. Refer to the D/42 Series User's Guide for more information specific to your PBX. Examples showing the contents of the application buffer for each supported switch are as follows: MITEL PBX (D/42D-SX) - 16-digit display Data 20 20 4E 4F 4E 45 20 41 43 54 49 56 45 20 20 20 00 xx xx xx xx xx xx xx Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Data xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx Byte 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 Northern Telecom SL-1 (D/42D-SL) - 16-digit display data 20 30 34 20 31 35 20 20 31 30 2D 30 38 2D 39 36 00 xx xx xx xx xx xx xx byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 data xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx byte 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 Northern Telecom Norstar (D/42-NS) - 32-digit display data 54 72 61 6E 73 66 65 72 20 20 20 20 20 20 20 20 byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 data 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 byte 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 data 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx byte 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 NEC KTS/PBX (D/42-NE2) - 32-digit display data 20 50 52 4F 47 52 41 4D 00 4D 4F 44 45 20 20 20 byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 data 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 byte 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 data 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx byte 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 Parameter Description devh: specifies the valid channel device descriptor obtained by a call to dx_open( ) bufferp: pointer to the application buffer. The buffer will contain the display data in ASCII format. Cautions The application buffer must be 49 bytes. The length of the LCD display data is variable (currently 16 or 32 bytes), and is stored as a null-terminated ASCII string. The 49 byte buffer size is for future expansion. An application that passes anything smaller will not be backward compatible in future releases. If you execute a function that updates the display (e.g., set the message waiting indicator, or show the calling number ID), ensure that you allow time for the switch to update the display before using d42_display( ), or you can call the d42_display( ) function until valid display data is returned. Example void main(void) { int devh; int rc = 0; char bufferp[49]; /* Open Channel Device */ if ( (devh = dx_open("dxxxB1C1",NULL))==-1) { printf("Error dx_open( )\n"); exit(-1); } /* End dx_open */ /* Wait for incoming call */ if ( (rc = dx_wtring(devh, 2, DX_ONHOOK, -1))==-1) { printf("Error dx_wtring( )\n"); dx_close(devh); exit(-1); } /* Get the Display Information */ if ( (rc = d42_display(devh, bufferp)) == -1) { printf("Error d42_display( )\n"); dx_close(devh); exit(-1); } /* End d42_display */ printf("Display = %s\n",bufferp); dx_close(devh); } /* End main */ Errors If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C. ED42_FWREQFAILURE Firmware error ED42_UNKNOWNBOARD Unknown D/42 board type ED42_BADDEVICE Invalid or wrong device handle ED42_INVALARG Invalid argument passed to function DXLIB_INVNRB Internal voice library error ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 16:22 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Т.е. вылетает в d42_display ? А стек вызова есть ? Падает в твоём процессе ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 17:36 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Падает именно на этой функции, я ее Msg-ами по бокам окружил, по этому именно на ней. На счет стека ... то его нет, падает только програмуля (Visual C++ не падает)... потом предлагая в оладочный режим войти, но так как у меня relase ... то в ассемблере предлагает отлаживать. Выдает еще сообщение ... скорей всего из за того что не может найти исходного текста: Unhandled exception in MoyFile.exe (LIBPRTMS.DLL): 0xC000005: Access Violation ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 18:11 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Да и в версии Debug - все отлично работает. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 18:16 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Поставь создание отладочной информации в release версии Project Settings->C++ General, Debug INfo - Programm database Link-> выставь Generate Debug Info ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.05.2004, 18:24 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Меня не было день, запрегли переписывать речевки. Так у меня это уже установлено ... что дальше делать ..... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.05.2004, 19:33 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Ежели в дебаг работает, а в релиз нет, то надо проверить а) инициализацию переменных и указателеЙ. В дебаг они афтоматически инициализируюца 0. б) проверить возможный выход за граници массива. Ибо где в памяти в дебаг находица ненужная инфа, в релизе может быть нужный код. Как вариант... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.05.2004, 19:45 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Не помогло... все переменные проверяны ... все вроди чисто, Вот на этой же фигне выскакивает .... if ((rc=d42_display(prom_int,&bufferp[0]))=-1) {} Не подскажите, как выделить память ... что бы она была доступна другим процессам (может из за того что выделенная память другим процессам недоступна ... эта фигня выскакивает) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.05.2004, 20:15 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
авторif ((rc=d42_display(prom_int,&bufferp[0]))=-1) {} А тута нигде еще одно '=' не пропущено? Может надо что-то типа: if ((rc=d42_display(prom_int,&bufferp[0]))==-1) {} ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.05.2004, 12:24 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
Пропущено, Вы правы .... Но ошибка не ушла .... всеравно выскакивает .... Может здесь все таки с памятью связано .... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.05.2004, 14:23 |
|
||
|
Инструкция по адресу 0x002f13b0 обратилась к памяти по адресу ....
|
|||
|---|---|---|---|
|
#18+
А если сделать как в примере: if ((rc=d42_display(prom_int,bufferp))==-1) {} ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.05.2004, 14:35 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=32531306&tid=2034905]: |
0ms |
get settings: |
8ms |
get forum list: |
21ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
74ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
49ms |
get tp. blocked users: |
1ms |
| others: | 205ms |
| total: | 377ms |

| 0 / 0 |
