질문,답변

글 수 1,629
명관범 *.97.115.74




안녕하세요.
하드웨어 제작처에서 제공되는 ActiveX를 CVI 에서 불러와서 사용하려고 합니다.
문제는 강좌란의 시삽님 글과 김정욱님, 김충영님의 ActiveX 글을 다 읽어봤는데 아래에 판넬에서 사용할 수 있도록 체크버튼을 선택할 수 있도록 되어야하나 저의 경우에는 그게 비활성화 되는군요. ActiveX가 상태가 안좋은가요 ㅋㅋㅋ

그러다 보니 CVI에서 인식은 해서 fp 파일로 프로젝트에 정상적으로 ADD 도 되어 있는 상황이지만, 판넬에서 ActiveX를 불러오면 세팅한 ActiveX가 목록에 나타타지 않습니다. 당연하 판넬 로드를 못하니 GetObjHandleFromactiveXCtrl() 함수도 실행을을 못합니다.

헬프파일에는

How will you be using ActiveX controls and document objects from this server?—Selects how you will use ActiveX controls and document objects from this server in your application. Some ActiveX controls and document objects can be used with or without a user interface. This option determines whether the object creation functions support the placement of controls and document objects on panels. LabWindows/CVI disables this control if the selected ActiveX server does not contain ActiveX controls or document objects.

간단히 말하면  ActiveX 컨트롤이나 도큐먼트 오브젝트가 판넬에서 사용할 수 없는 것일경우 disable 된다고 나와있는데요. 이럴경우에는 activex 핸들을 우찌 가져오면 됩니까?

이런경우에는 어떻게 해야 하나요..

그리고 혹시 LIN 프로토콜로 슬레이브와 통신해본적 있으신분 경험이나 코드좀 얻을수 있을까요? 독일산 EmuLIN 이란 장비를 tunnel로 사용하여 PC에서 Slave와 통신을 하는 프로그램을 제작해야 하는데 LIN 쪽 참고 코드 구하기가 너무 어렵습니다.

코드도 좀 올려봅니다.
판넬은 위의 그림에 같이 올려드릴게요...

#include <windows.h>
#include <cvirte.h>                
#include <userint.h>
#include "Lin_ActiveX_Test.h"
#include "LIN_Test.h"

static int panelHandle;
int LinHandle=0;

CAObjHandle LincltHandle;
VARIANT m_cltHandle;
VARIANT        value;
                                                                                                        /*   CAObjHandle objectHandle,
                                                         ERRORINFO *errorInfo,
                                                         VARIANT *cltHandle,
                                                         long wNodesFilter,
                                                         long wSubnetFilter,
                                                         VARIANT *value
                                                                                                        */






int main (int argc, char *argv[])
{
        if (InitCVIRTE (0, argv, 0) == 0)
                return -1;        /* out of memory */
        if ((panelHandle = LoadPanel (0, "LIN_Test.uir", PANEL)) < 0)
                return -1;
        DisplayPanel (panelHandle);
//        GetObjHandleFromActiveXCtrl (panelHandle, PANEL_ACTMBSTB, &hMBSTB);
        RunUserInterface ();
        
        return 0;
}
                                                                                        

int CVICALLBACK Close (int panel, int control, int event,
                void *callbackData, int eventData1, int eventData2)
{
        switch (event)
                {
                case EVENT_COMMIT:

                        DiscardPanel(panelHandle);
                        QuitUserInterface(panelHandle);
                        break;
                }
        return 0;
}

int CVICALLBACK Connect_Client (int panel, int control, int event,
                void *callbackData, int eventData1, int eventData2)
{
        switch (event)
                {
                case EVENT_COMMIT:

                          LinHandle = AcxLinTools_IClientlt_ConnectDataClient (LincltHandle, NULL, &m_cltHandle, 0, 0, &value);  
                          
                        break;
                }
        return 0;
}



List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 이제부터 질문은 LabWindows/CVI 카페를 이용하면 더 좋겠습니다 운영자 2020-11-11 1235
공지 파일(특히 그림파일)을 올리실 때의 유의사항 운영자 2004-07-16 100156
1189 NotifyIcon [1] mrjung 2008-11-18 4987
1188 ActiveX 제거 [2] 명관범 2008-11-17 4536
1187 [File I/O] 및 [Graph Drawing] 질문. [3] 진병철 2008-11-13 3399
1186 header가 안되는 이유가...? file [2] 김준홍 2008-11-08 4552
» ActiveX 불러와서 사용하기 문의점 과 LIN 프로토콜 경험 문의 file 명관범 2008-11-05 4592
1184 허창원님이 많이 바쁘셔서 답변이 없으신가요? [2] Dustin 2008-10-30 4817
1183 문자열 사이사이 공백 없애기 질문입니다. [3] Gen4 2008-10-30 4632
1182 modbus RTU 통신 Dustin 2008-10-28 5525
1181 안녕하세요~ String Search와 Manipulation에 대해서 궁금한 게 있습니다. [1] 궁금 2008-10-28 4446
1180 [re] 안녕하세요~ String Search와 Manipulation에 대해서 궁금한 게 있습니다. [4] 궁금 2008-10-29 3461
1179 [re] 첨부한 소스 참고해보세요 file [1] 허창원 2008-10-29 4899
1178 배포판 배포시 글씨 폰트 질문입니다. [1] aquarius 2008-10-23 3083
1177 General Protection Errors, DMA 관련 에러 [1] 강현우 2008-10-21 3113
1176 Bitmap 연산 속도에 관한 질문 file [4] 이현화 2008-10-20 5171
1175 [re] Bitmap 연산 속도에 관한 질문 file [4] 홍동기 2008-10-25 2984
1174 [질문]KD_SSimulator, 극동테크의 RS-232 시뮬레이터 프로그램 소스 사용관련 file [4] 준혁빠빠 2008-10-18 5090
1173 이더넷(ethernet)통신으로 초간단한h/w보드제어 질문요 ㅠㅠ [4] 신입 2008-10-17 4696
1172 CVI와 MFC의 차이점 문의 건 정건필 2008-10-16 3735
1171 [re] CVI와 MFC의 차이점 문의 건 허창원 2008-10-16 4016
1170 배포판 업데이트 [1] aquarius 2008-10-14 3642