Added missing STDCALL

This CL adds the missing STDCALLs in attachment APIs.

Bug=pdfium:818

Change-Id: Ifaa9cf84d4036cd6444167f8efd16dad81224afc
Reviewed-on: https://pdfium-review.googlesource.com/8930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/fpdfsdk/fpdfattachment.cpp b/fpdfsdk/fpdfattachment.cpp
index 724664b..78fccf4 100644
--- a/fpdfsdk/fpdfattachment.cpp
+++ b/fpdfsdk/fpdfattachment.cpp
@@ -4,6 +4,9 @@
 
 #include "public/fpdf_attachment.h"
 
+#include <memory>
+#include <utility>
+
 #include "core/fdrm/crypto/fx_crypt.h"
 #include "core/fpdfapi/page/cpdf_streamparser.h"
 #include "core/fpdfapi/parser/cpdf_array.h"
@@ -51,8 +54,8 @@
   return CPDF_NameTree(pDoc, "EmbeddedFiles").GetCount();
 }
 
-DLLEXPORT FPDF_ATTACHMENT FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
-                                                FPDF_WIDESTRING name) {
+DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
+                                                        FPDF_WIDESTRING name) {
   CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
   CFX_WideString wsName =
       CFX_WideString::FromUTF16LE(name, CFX_WideString::WStringLength(name));
@@ -198,10 +201,10 @@
   return Utf16EncodeMaybeCopyAndReturnLength(value, buffer, buflen);
 }
 
-DLLEXPORT FPDF_BOOL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
-                                           FPDF_DOCUMENT document,
-                                           const void* contents,
-                                           const unsigned long len) {
+DLLEXPORT FPDF_BOOL STDCALL 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)
diff --git a/public/fpdf_attachment.h b/public/fpdf_attachment.h
index 6a23970..e604d59 100644
--- a/public/fpdf_attachment.h
+++ b/public/fpdf_attachment.h
@@ -30,8 +30,8 @@
 //   name     - name of the new attachment.
 //
 // Returns a handle to the new attachment object, or NULL on failure.
-DLLEXPORT FPDF_ATTACHMENT FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
-                                                FPDF_WIDESTRING name);
+DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document,
+                                                        FPDF_WIDESTRING name);
 
 // Experimental API.
 // Get the embedded attachment at |index| in |document|. Note that the returned
@@ -128,10 +128,10 @@
 //   len        - length of file data.
 //
 // Returns true if successful.
-DLLEXPORT FPDF_BOOL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
-                                           FPDF_DOCUMENT document,
-                                           const void* contents,
-                                           const unsigned long len);
+DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
+                                                   FPDF_DOCUMENT document,
+                                                   const void* contents,
+                                                   const unsigned long len);
 
 // Experimental API.
 // Get the file data of |attachment|. |buffer| is only modified if |buflen| is