summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfattachment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfattachment.cpp')
-rw-r--r--fpdfsdk/fpdfattachment.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/fpdfsdk/fpdfattachment.cpp b/fpdfsdk/fpdfattachment.cpp
index 5bdb3bd4a2..b759ae2655 100644
--- a/fpdfsdk/fpdfattachment.cpp
+++ b/fpdfsdk/fpdfattachment.cpp
@@ -45,7 +45,8 @@ CFX_ByteString GenerateMD5Base16(const void* contents,
} // namespace
-DLLEXPORT int STDCALL FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
+FPDF_EXPORT int FPDF_CALLCONV
+FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return 0;
@@ -53,8 +54,8 @@ DLLEXPORT int STDCALL FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) {
return CPDF_NameTree(pDoc, "EmbeddedFiles").GetCount();
}
-DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
- FPDF_WIDESTRING name) {
+FPDF_EXPORT FPDF_ATTACHMENT FPDF_CALLCONV
+FPDFDoc_AddAttachment(FPDF_DOCUMENT document, FPDF_WIDESTRING name) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
CFX_WideString wsName =
CFX_WideString::FromUTF16LE(name, CFX_WideString::WStringLength(name));
@@ -97,8 +98,8 @@ DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
return pFile;
}
-DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_GetAttachment(FPDF_DOCUMENT document,
- int index) {
+FPDF_EXPORT FPDF_ATTACHMENT FPDF_CALLCONV
+FPDFDoc_GetAttachment(FPDF_DOCUMENT document, int index) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || index < 0)
return nullptr;
@@ -111,8 +112,8 @@ DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_GetAttachment(FPDF_DOCUMENT document,
return nameTree.LookupValueAndName(index, &csName);
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document,
- int index) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document, int index) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc || index < 0)
return false;
@@ -124,7 +125,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFDoc_DeleteAttachment(FPDF_DOCUMENT document,
return nameTree.DeleteValueAndName(index);
}
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFAttachment_GetName(FPDF_ATTACHMENT attachment,
void* buffer,
unsigned long buflen) {
@@ -136,8 +137,8 @@ FPDFAttachment_GetName(FPDF_ATTACHMENT attachment,
buffer, buflen);
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment,
- FPDF_WIDESTRING key) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment);
if (!pFile)
return 0;
@@ -149,7 +150,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment,
return pParamsDict->KeyExist(CFXByteStringFromFPDFWideString(key));
}
-DLLEXPORT FPDF_OBJECT_TYPE STDCALL
+FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV
FPDFAttachment_GetValueType(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
if (!FPDFAttachment_HasKey(attachment, key))
return FPDF_OBJECT_UNKNOWN;
@@ -163,7 +164,7 @@ FPDFAttachment_GetValueType(FPDF_ATTACHMENT attachment, FPDF_WIDESTRING key) {
return pObj->GetType();
}
-DLLEXPORT FPDF_BOOL STDCALL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAttachment_SetStringValue(FPDF_ATTACHMENT attachment,
FPDF_WIDESTRING key,
FPDF_WIDESTRING value) {
@@ -185,7 +186,7 @@ FPDFAttachment_SetStringValue(FPDF_ATTACHMENT attachment,
return true;
}
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFAttachment_GetStringValue(FPDF_ATTACHMENT attachment,
FPDF_WIDESTRING key,
void* buffer,
@@ -213,10 +214,11 @@ FPDFAttachment_GetStringValue(FPDF_ATTACHMENT attachment,
return Utf16EncodeMaybeCopyAndReturnLength(value, buffer, buflen);
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
- FPDF_DOCUMENT document,
- const void* contents,
- const unsigned long len) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
+ FPDF_DOCUMENT document,
+ const void* contents,
+ const unsigned long len) {
CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment);
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pFile || !pFile->IsDictionary() || !pDoc || len > INT_MAX)
@@ -260,7 +262,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
return true;
}
-DLLEXPORT unsigned long STDCALL
+FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDFAttachment_GetFile(FPDF_ATTACHMENT attachment,
void* buffer,
unsigned long buflen) {