Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

m_lpDispatch value getting NULL

New Here ,
Dec 27, 2016 Dec 27, 2016

Hello,

I am using OLE Automation C++ APIs for Inter-Application communication.

I want to get the selected text in PDF and apply annotation to that text.

For this purpose, I created the CAcroPDTextSelect object as below:

CAcroPDTextSelect *textSelect = NULL;

if (!textSelect) {

     COleException e;

     textSelect = new CAcroPDTextSelect;

     textSelect->CreateDispatch("AcroExch.PDTextSelect", &e);

}

Then I am calling the function GetNumText with the object textSelect as below:

long numText = textSelect->GetNumText();

However, execution of this function gives error : Access violation reading location 0xCDFAEB2C.

When I did some debugging then I came to know that object m_lpDispatch = 0x00000000 <NULL>

Am I missing something while initializing things?

Please help!


Thank you in advance!

Regards,

Navnath

TOPICS
Acrobat SDK and JavaScript
286
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation