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

[CS5] Which of the argument of xSDKExport is correct?

New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hi,

CS5r1 SDK with Premiere CS5 trial version

There are definition of the xSDKExport as follows.
Which is correct?


(a) Headers/PrSDKExport.h
typedef PREMPLUGENTRY (* ExportEntryFunc)(csSDK_int32 selector, exportStdParms *stdparms, void* param1, void* param2);

(b) Projects/SDK_Exporter/SDK_Exporter.cpp
DllExport PREMPLUGENTRY xSDKExport (
    int             selector,
    exportStdParms  *stdParmsP,
    long            param1,
    long            param2)


I seem that (a) is correct.
But, the xSDKExport of the plug-in is not called by host in the case of (a). (32bit/64bit both)


Regards,
Kengo Mikoshiba.

TOPICS
SDK

Views

1.0K

Translate

Translate

Report

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

correct answers 1 Correct answer

Advisor , May 06, 2010 May 06, 2010

Hi Kengo-san,

> I think that you should correct "SDK_Exporter" and "RTPlayback" sample  program.

Thanks for the feedback.  I'll correct it for the next SDK release.  Yes, there still remains some conversions that need be done in the sample projects, to get rid of long type usage.

Hi Rallymax,

> I'm glad we have this forum to help each other!

Glad this SDK forum is proving to be of help!  Thanks for supporting it!

Votes

Translate

Translate
Guest
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

In my thinking it HAS to be "void *" because the params are pointers to different structures depending on the selector.

I think one of the CS3 SDK examples had "long" as well - I seem to remember changing it to "void *".

It matters because sizeof( void * ) will be "long" on 32bit machines and "long long" on 64bit machines. Thus if you try to keep it as "long" it will truncate the size if used on 64bit machines. If the compiler is any good, and it's compiling for a 64bit target it should give you an error. For 32bit it should be a warning (since long is actually "signed long" and thus is only 31bits of the possible 32bit address.

Anyhow, from what Zac's said, all CS5 is 64bit only so the correct type must be "void *" not "long".

Regards,

Rallymax.

Votes

Translate

Translate

Report

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
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hi Rallymax-san,

I was not correcting the argument of the extern declaration of the header file of my plug-in.
The plug-in did not operate because the declaration and the definition were the disagreements.
I had completely forgotten the extern declaration.
It was my mistake. I am sorry.

I think that you should correct "SDK_Exporter" and "RTPlayback" sample program.

Regards,

Kengo Mikoshiba.

Votes

Translate

Translate

Report

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
Guest
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

>I think that you should correct "SDK_Exporter" and "RTPlayback" sample program.

Yes, I agree. I lost quite some time until I could work out that I had mixed the void* and the long in my exporter based on the example. In my case it was worse because I had cast "param1" to the structure and thus disabled the compiler from warning me about the type mismatch.

I'm glad we have this forum to help each other!

R.

Votes

Translate

Translate

Report

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
Advisor ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hi Kengo-san,

> I think that you should correct "SDK_Exporter" and "RTPlayback" sample  program.

Thanks for the feedback.  I'll correct it for the next SDK release.  Yes, there still remains some conversions that need be done in the sample projects, to get rid of long type usage.

Hi Rallymax,

> I'm glad we have this forum to help each other!

Glad this SDK forum is proving to be of help!  Thanks for supporting it!

Votes

Translate

Translate

Report

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
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

LATEST

Hi Zac-san,

I found another mistake.

SDK_Exporter_Params.cpp

line 488

x    for (int i = 0; i < sizeof (PARs[0]); i++)
o    for (int i = 0; i < sizeof(PARs) / sizeof (PARs[0]); i++)

Regards,

Kengo Mikoshiba.

Votes

Translate

Translate

Report

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