diff -rupN orig/d3dhelpers.c new/d3dhelpers.c
--- orig/d3dhelpers.c	Fri Jul 10 10:26:29 2015
+++ new/d3dhelpers.c	Fri Jul 10 06:45:20 2015
@@ -23,6 +23,10 @@
 #include "config.h"
 #endif
 
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
 #include "d3dvideosink.h"
 #include "d3dhelpers.h"
 
@@ -717,8 +721,9 @@ gst_d3dsurface_buffer_pool_release_buffe
     return;
   }
 
-  return GST_BUFFER_POOL_CLASS
-      (gst_d3dsurface_buffer_pool_parent_class)->release_buffer (bpool, buffer);
+  //return 
+	GST_BUFFER_POOL_CLASS
+	(gst_d3dsurface_buffer_pool_parent_class)->release_buffer (bpool, buffer);
 }
 
 static void
@@ -2011,7 +2016,7 @@ d3d_wnd_proc (HWND hWnd, UINT message, W
     case WM_KEYUP:
       if (sink->enable_navigation_events) {
         gunichar2 wcrep[128];
-        if (GetKeyNameTextW (lParam, (LPWSTR) wcrep, 128)) {
+        if (GetKeyNameTextW ((LONG)lParam, (LPWSTR) wcrep, 128)) {
           gchar *utfrep = g_utf16_to_utf8 (wcrep, 128, NULL, NULL, NULL);
           if (utfrep) {
             if (message == WM_KEYDOWN)
diff -rupN orig/d3dhelpers.h new/d3dhelpers.h
--- orig/d3dhelpers.h	Fri Jul 10 10:26:21 2015
+++ new/d3dhelpers.h	Fri Jul 10 06:45:00 2015
@@ -44,7 +44,7 @@
 #endif
 
 #include <d3d9.h>
-#include <d3dx9tex.h>
+//#include <d3dx9tex.h>
 
 typedef struct _GstD3DVideoSink_WB GstD3DVideoSink_WB;
 typedef struct _GstD3DVideoSink_WBClass GstD3DVideoSink_WBClass;
diff -rupN orig/d3dvideosink.c new/d3dvideosink.c
--- orig/d3dvideosink.c	Fri Jul 10 10:26:12 2015
+++ new/d3dvideosink.c	Fri Jul 10 06:45:50 2015

@@ -370,7 +370,7 @@ gst_d3dvideosink_set_caps (GstBaseSink *
   newpool = gst_d3dsurface_buffer_pool_new (sink);
   config = gst_buffer_pool_get_config (newpool);
   /* we need at least 2 buffer because we hold on to the last one */
-  gst_buffer_pool_config_set_params (config, caps, sink->info.size, 2, 0);
+  gst_buffer_pool_config_set_params (config, caps, (guint)sink->info.size, 2, 0);
   if (!gst_buffer_pool_set_config (newpool, config)) {
     gst_object_unref (newpool);
     GST_ERROR_OBJECT (sink, "Failed to set buffer pool configuration");
@@ -380,7 +380,7 @@ gst_d3dvideosink_set_caps (GstBaseSink *
   newfbpool = gst_d3dsurface_buffer_pool_new (sink);
   config = gst_buffer_pool_get_config (newfbpool);
   /* we need at least 2 buffer because we hold on to the last one */
-  gst_buffer_pool_config_set_params (config, caps, sink->info.size, 2, 0);
+  gst_buffer_pool_config_set_params (config, caps, (guint)sink->info.size, 2, 0);
   /* Fallback pool must use videometa */
   gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META);
   if (!gst_buffer_pool_set_config (newfbpool, config)) {
@@ -512,7 +512,7 @@ gst_d3dvideosink_propose_allocation (Gst
     pool = gst_d3dsurface_buffer_pool_new (sink);
 
     /* the normal size of a frame */
-    size = info.size;
+    size = (guint)info.size;
 
     config = gst_buffer_pool_get_config (pool);
     /* we need at least 2 buffer because we hold on to the last one */
@@ -619,8 +619,14 @@ plugin_init (GstPlugin * plugin)
   return TRUE;
 }
 
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+gboolean gst_d3dvideosink_wb_plugin_init(GstPlugin *plugin) {
+
+	return plugin_init(plugin);
+}
+
+/*GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     d3dsinkwrapper,
     "Direct3D sink wrapper plugin",
     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
+*/
\ No newline at end of file
diff -rupN orig/d3dvideosink.h new/d3dvideosink.h
--- orig/d3dvideosink.h	Fri Jul 10 10:26:00 2015
+++ new/d3dvideosink.h	Fri Jul 10 06:45:35 2015
@@ -88,6 +88,7 @@ struct _GstD3DVideoSink_WBClass
 #endif
 
 GType    gst_d3dvideosink_get_type (void);
+gboolean gst_d3dvideosink_wb_plugin_init(GstPlugin *plugin);
 
 G_END_DECLS
 
