aboutsummaryrefslogtreecommitdiff
path: root/ports/dxut/dll.patch
blob: 4557ab88acc219f81a11276769a2d5778686f826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
diff --git a/Core/DDSTextureLoader.h b/Core/DDSTextureLoader.h
index 122df9f..8af6c62 100644
--- a/Core/DDSTextureLoader.h
+++ b/Core/DDSTextureLoader.h
@@ -23,6 +23,11 @@
 #include <d3d11_1.h>
 #include <stdint.h>
 
+#ifdef DXUT_EXPORT
+	#define DXUT_API __declspec(dllexport)
+#else
+	#define DXUT_API __declspec(dllimport)
+#endif
 
 namespace DirectX
 {
@@ -34,9 +39,9 @@ namespace DirectX
         DDS_ALPHA_MODE_OPAQUE        = 3,
         DDS_ALPHA_MODE_CUSTOM        = 4,
     };
-
+	
     // Standard version
-    HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
                                         _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
                                         _In_ size_t ddsDataSize,
                                         _Outptr_opt_ ID3D11Resource** texture,
@@ -45,7 +50,7 @@ namespace DirectX
                                         _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
                                       );
 
-    HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
                                       _In_z_ const wchar_t* szFileName,
                                       _Outptr_opt_ ID3D11Resource** texture,
                                       _Outptr_opt_ ID3D11ShaderResourceView** textureView,
@@ -54,7 +59,7 @@ namespace DirectX
                                     );
 
     // Standard version with optional auto-gen mipmap support
-    HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
                                         _In_opt_ ID3D11DeviceContext* d3dContext,
                                         _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
                                         _In_ size_t ddsDataSize,
@@ -64,7 +69,7 @@ namespace DirectX
                                         _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
                                       );
 
-    HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
                                       _In_opt_ ID3D11DeviceContext* d3dContext,
                                       _In_z_ const wchar_t* szFileName,
                                       _Outptr_opt_ ID3D11Resource** texture,
@@ -74,7 +79,7 @@ namespace DirectX
                                     );
 
     // Extended version
-    HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
                                           _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
                                           _In_ size_t ddsDataSize,
                                           _In_ size_t maxsize,
@@ -88,7 +93,7 @@ namespace DirectX
                                           _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
                                       );
 
-    HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
                                         _In_z_ const wchar_t* szFileName,
                                         _In_ size_t maxsize,
                                         _In_ D3D11_USAGE usage,
@@ -102,7 +107,7 @@ namespace DirectX
                                     );
 
     // Extended version with optional auto-gen mipmap support
-    HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
                                           _In_opt_ ID3D11DeviceContext* d3dContext,
                                           _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
                                           _In_ size_t ddsDataSize,
@@ -117,7 +122,7 @@ namespace DirectX
                                           _Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
                                       );
 
-    HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
+    HRESULT DXUT_API CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
                                         _In_opt_ ID3D11DeviceContext* d3dContext,
                                         _In_z_ const wchar_t* szFileName,
                                         _In_ size_t maxsize,
diff --git a/Core/DXUT.h b/Core/DXUT.h
index fc6247e..a0e06fa 100644
--- a/Core/DXUT.h
+++ b/Core/DXUT.h
@@ -12,6 +12,12 @@
 //--------------------------------------------------------------------------------------
 #pragma once
 
+#ifdef DXUT_EXPORT
+	#define DXUT_API __declspec(dllexport)
+#else
+	#define DXUT_API __declspec(dllimport)
+#endif
+
 #ifndef UNICODE
 #error "DXUT requires a Unicode build."
 #endif
@@ -207,68 +213,68 @@ typedef void    (CALLBACK *LPDXUTCALLBACKD3D11SWAPCHAINRELEASING)( _In_opt_ void
 typedef void    (CALLBACK *LPDXUTCALLBACKD3D11DEVICEDESTROYED)( _In_opt_ void* pUserContext );
 
 // General callbacks
-void WINAPI DXUTSetCallbackFrameMove( _In_ LPDXUTCALLBACKFRAMEMOVE pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackKeyboard( _In_ LPDXUTCALLBACKKEYBOARD pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackMouse( _In_ LPDXUTCALLBACKMOUSE pCallback, bool bIncludeMouseMove = false, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackMsgProc( _In_ LPDXUTCALLBACKMSGPROC pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackDeviceChanging( _In_ LPDXUTCALLBACKMODIFYDEVICESETTINGS pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackDeviceRemoved( _In_ LPDXUTCALLBACKDEVICEREMOVED pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackFrameMove( _In_ LPDXUTCALLBACKFRAMEMOVE pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackKeyboard( _In_ LPDXUTCALLBACKKEYBOARD pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackMouse( _In_ LPDXUTCALLBACKMOUSE pCallback, bool bIncludeMouseMove = false, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackMsgProc( _In_ LPDXUTCALLBACKMSGPROC pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackDeviceChanging( _In_ LPDXUTCALLBACKMODIFYDEVICESETTINGS pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackDeviceRemoved( _In_ LPDXUTCALLBACKDEVICEREMOVED pCallback, _In_opt_ void* pUserContext = nullptr );
 
 // Direct3D 11 callbacks
-void WINAPI DXUTSetCallbackD3D11DeviceAcceptable( _In_ LPDXUTCALLBACKISD3D11DEVICEACCEPTABLE pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackD3D11DeviceCreated( _In_ LPDXUTCALLBACKD3D11DEVICECREATED pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackD3D11SwapChainResized( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRESIZED pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackD3D11FrameRender( _In_ LPDXUTCALLBACKD3D11FRAMERENDER pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackD3D11SwapChainReleasing( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRELEASING pCallback, _In_opt_ void* pUserContext = nullptr );
-void WINAPI DXUTSetCallbackD3D11DeviceDestroyed( _In_ LPDXUTCALLBACKD3D11DEVICEDESTROYED pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceAcceptable( _In_ LPDXUTCALLBACKISD3D11DEVICEACCEPTABLE pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceCreated( _In_ LPDXUTCALLBACKD3D11DEVICECREATED pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11SwapChainResized( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRESIZED pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11FrameRender( _In_ LPDXUTCALLBACKD3D11FRAMERENDER pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11SwapChainReleasing( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRELEASING pCallback, _In_opt_ void* pUserContext = nullptr );
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceDestroyed( _In_ LPDXUTCALLBACKD3D11DEVICEDESTROYED pCallback, _In_opt_ void* pUserContext = nullptr );
 
 
 //--------------------------------------------------------------------------------------
 // Initialization
 //--------------------------------------------------------------------------------------
-HRESULT WINAPI DXUTInit( _In_ bool bParseCommandLine = true, 
+HRESULT DXUT_API WINAPI DXUTInit( _In_ bool bParseCommandLine = true,
                          _In_ bool bShowMsgBoxOnError = true, 
                          _In_opt_ WCHAR* strExtraCommandLineParams = nullptr,
                          _In_ bool bThreadSafeDXUT = false );
 
 // Choose either DXUTCreateWindow or DXUTSetWindow.  If using DXUTSetWindow, consider using DXUTStaticWndProc
-HRESULT WINAPI DXUTCreateWindow( _In_z_ const WCHAR* strWindowTitle = L"Direct3D Window", 
+HRESULT DXUT_API WINAPI DXUTCreateWindow( _In_z_ const WCHAR* strWindowTitle = L"Direct3D Window",
                                  _In_opt_ HINSTANCE hInstance = nullptr, _In_opt_ HICON hIcon = nullptr, _In_opt_ HMENU hMenu = nullptr,
                                  _In_ int x = CW_USEDEFAULT, _In_ int y = CW_USEDEFAULT );
-HRESULT WINAPI DXUTSetWindow( _In_ HWND hWndFocus, _In_ HWND hWndDeviceFullScreen, _In_ HWND hWndDeviceWindowed, _In_ bool bHandleMessages = true );
-LRESULT CALLBACK DXUTStaticWndProc( _In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam );
+HRESULT DXUT_API WINAPI DXUTSetWindow( _In_ HWND hWndFocus, _In_ HWND hWndDeviceFullScreen, _In_ HWND hWndDeviceWindowed, _In_ bool bHandleMessages = true );
+LRESULT DXUT_API CALLBACK DXUTStaticWndProc( _In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam );
 
 // Choose either DXUTCreateDevice or DXUTCreateD3DDeviceFromSettings
 
-HRESULT WINAPI DXUTCreateDevice(_In_ D3D_FEATURE_LEVEL reqFL, _In_ bool bWindowed= true, _In_ int nSuggestedWidth =0,_In_  int nSuggestedHeight =0 );
-HRESULT WINAPI DXUTCreateDeviceFromSettings( _In_ DXUTDeviceSettings* pDeviceSettings, _In_ bool bClipWindowToSingleAdapter = true );
+HRESULT DXUT_API WINAPI DXUTCreateDevice(_In_ D3D_FEATURE_LEVEL reqFL, _In_ bool bWindowed= true, _In_ int nSuggestedWidth =0,_In_  int nSuggestedHeight =0 );
+HRESULT DXUT_API WINAPI DXUTCreateDeviceFromSettings( _In_ DXUTDeviceSettings* pDeviceSettings, _In_ bool bClipWindowToSingleAdapter = true );
 
 // Choose either DXUTMainLoop or implement your own main loop 
-HRESULT WINAPI DXUTMainLoop( _In_opt_ HACCEL hAccel = nullptr );
+HRESULT DXUT_API WINAPI DXUTMainLoop( _In_opt_ HACCEL hAccel = nullptr );
 
 // If not using DXUTMainLoop consider using DXUTRender3DEnvironment
-void WINAPI DXUTRender3DEnvironment();
+void DXUT_API WINAPI DXUTRender3DEnvironment();
 
 
 //--------------------------------------------------------------------------------------
 // Common Tasks 
 //--------------------------------------------------------------------------------------
-HRESULT WINAPI DXUTToggleFullScreen();
-HRESULT WINAPI DXUTToggleREF();
-HRESULT WINAPI DXUTToggleWARP();
-void    WINAPI DXUTPause( _In_ bool bPauseTime, _In_ bool bPauseRendering );
-void    WINAPI DXUTSetConstantFrameTime( _In_ bool bConstantFrameTime, _In_ float fTimePerFrame = 0.0333f );
-void    WINAPI DXUTSetCursorSettings( _In_ bool bShowCursorWhenFullScreen = false, _In_ bool bClipCursorWhenFullScreen = false );
-void    WINAPI DXUTSetHotkeyHandling( _In_ bool bAltEnterToToggleFullscreen = true, _In_ bool bEscapeToQuit = true, _In_ bool bPauseToToggleTimePause = true );
-void    WINAPI DXUTSetMultimonSettings( _In_ bool bAutoChangeAdapter = true );
-void    WINAPI DXUTSetShortcutKeySettings( _In_ bool bAllowWhenFullscreen = false, _In_ bool bAllowWhenWindowed = true ); // Controls the Windows key, and accessibility shortcut keys
-void    WINAPI DXUTSetWindowSettings( _In_ bool bCallDefWindowProc = true );
-HRESULT WINAPI DXUTSetTimer( _In_ LPDXUTCALLBACKTIMER pCallbackTimer, _In_ float fTimeoutInSecs = 1.0f, _Out_opt_ UINT* pnIDEvent = nullptr, _In_opt_ void* pCallbackUserContext = nullptr );
-HRESULT WINAPI DXUTKillTimer( _In_ UINT nIDEvent );
-void    WINAPI DXUTResetFrameworkState();
-void    WINAPI DXUTShutdown( _In_ int nExitCode = 0 );
-void    WINAPI DXUTSetIsInGammaCorrectMode( _In_ bool bGammaCorrect );
-bool    WINAPI DXUTGetMSAASwapChainCreated();
+HRESULT DXUT_API WINAPI DXUTToggleFullScreen();
+HRESULT DXUT_API WINAPI DXUTToggleREF();
+HRESULT DXUT_API WINAPI DXUTToggleWARP();
+void    DXUT_API WINAPI DXUTPause( _In_ bool bPauseTime, _In_ bool bPauseRendering );
+void    DXUT_API WINAPI DXUTSetConstantFrameTime( _In_ bool bConstantFrameTime, _In_ float fTimePerFrame = 0.0333f );
+void    DXUT_API WINAPI DXUTSetCursorSettings( _In_ bool bShowCursorWhenFullScreen = false, _In_ bool bClipCursorWhenFullScreen = false );
+void    DXUT_API WINAPI DXUTSetHotkeyHandling( _In_ bool bAltEnterToToggleFullscreen = true, _In_ bool bEscapeToQuit = true, _In_ bool bPauseToToggleTimePause = true );
+void    DXUT_API WINAPI DXUTSetMultimonSettings( _In_ bool bAutoChangeAdapter = true );
+void    DXUT_API WINAPI DXUTSetShortcutKeySettings( _In_ bool bAllowWhenFullscreen = false, _In_ bool bAllowWhenWindowed = true ); // Controls the Windows key, and accessibility shortcut keys
+void    DXUT_API WINAPI DXUTSetWindowSettings( _In_ bool bCallDefWindowProc = true );
+HRESULT DXUT_API WINAPI DXUTSetTimer( _In_ LPDXUTCALLBACKTIMER pCallbackTimer, _In_ float fTimeoutInSecs = 1.0f, _Out_opt_ UINT* pnIDEvent = nullptr, _In_opt_ void* pCallbackUserContext = nullptr );
+HRESULT DXUT_API WINAPI DXUTKillTimer( _In_ UINT nIDEvent );
+void    DXUT_API WINAPI DXUTResetFrameworkState();
+void    DXUT_API WINAPI DXUTShutdown( _In_ int nExitCode = 0 );
+void    DXUT_API WINAPI DXUTSetIsInGammaCorrectMode( _In_ bool bGammaCorrect );
+bool    DXUT_API WINAPI DXUTGetMSAASwapChainCreated();
 
 
 //--------------------------------------------------------------------------------------
@@ -276,63 +282,63 @@ bool    WINAPI DXUTGetMSAASwapChainCreated();
 //--------------------------------------------------------------------------------------
 
 // Direct3D 11.x (These do not addref unlike typical Get* APIs)
-IDXGIFactory1*           WINAPI DXUTGetDXGIFactory(); 
-IDXGISwapChain*          WINAPI DXUTGetDXGISwapChain();
-const DXGI_SURFACE_DESC* WINAPI DXUTGetDXGIBackBufferSurfaceDesc();
-HRESULT                  WINAPI DXUTSetupD3D11Views( _In_ ID3D11DeviceContext* pd3dDeviceContext ); // Supports immediate or deferred context
-D3D_FEATURE_LEVEL        WINAPI DXUTGetD3D11DeviceFeatureLevel(); // Returns the D3D11 devices current feature level
-ID3D11RenderTargetView*  WINAPI DXUTGetD3D11RenderTargetView();
-ID3D11DepthStencilView*  WINAPI DXUTGetD3D11DepthStencilView();
+DXUT_API IDXGIFactory1*           WINAPI DXUTGetDXGIFactory();
+DXUT_API IDXGISwapChain*          WINAPI DXUTGetDXGISwapChain();
+DXUT_API const DXGI_SURFACE_DESC* WINAPI DXUTGetDXGIBackBufferSurfaceDesc();
+DXUT_API HRESULT                  WINAPI DXUTSetupD3D11Views(_In_ ID3D11DeviceContext* pd3dDeviceContext); // Supports immediate or deferred context
+DXUT_API D3D_FEATURE_LEVEL        WINAPI DXUTGetD3D11DeviceFeatureLevel(); // Returns the D3D11 devices current feature level
+DXUT_API ID3D11RenderTargetView*  WINAPI DXUTGetD3D11RenderTargetView();
+DXUT_API ID3D11DepthStencilView*  WINAPI DXUTGetD3D11DepthStencilView();
 
-ID3D11Device*            WINAPI DXUTGetD3D11Device();
-ID3D11DeviceContext*     WINAPI DXUTGetD3D11DeviceContext();
+DXUT_API ID3D11Device*            WINAPI DXUTGetD3D11Device();
+DXUT_API ID3D11DeviceContext*     WINAPI DXUTGetD3D11DeviceContext();
 
-ID3D11Device1*           WINAPI DXUTGetD3D11Device1();
-ID3D11DeviceContext1*	 WINAPI DXUTGetD3D11DeviceContext1();
+DXUT_API ID3D11Device1*           WINAPI DXUTGetD3D11Device1();
+DXUT_API ID3D11DeviceContext1*	 WINAPI DXUTGetD3D11DeviceContext1();
 
 #ifdef USE_DIRECT3D11_2
-ID3D11Device2*           WINAPI DXUTGetD3D11Device2();
-ID3D11DeviceContext2*	 WINAPI DXUTGetD3D11DeviceContext2();
+DXUT_API ID3D11Device2*           WINAPI DXUTGetD3D11Device2();
+DXUT_API ID3D11DeviceContext2*	 WINAPI DXUTGetD3D11DeviceContext2();
 #endif
 
 #ifdef USE_DIRECT3D11_3
-ID3D11Device3*           WINAPI DXUTGetD3D11Device3();
-ID3D11DeviceContext3*	 WINAPI DXUTGetD3D11DeviceContext3();
+DXUT_API ID3D11Device3*           WINAPI DXUTGetD3D11Device3();
+DXUT_API ID3D11DeviceContext3*	 WINAPI DXUTGetD3D11DeviceContext3();
 #endif
 
 // General
-DXUTDeviceSettings WINAPI DXUTGetDeviceSettings(); 
-HINSTANCE WINAPI DXUTGetHINSTANCE();
-HWND      WINAPI DXUTGetHWND();
-HWND      WINAPI DXUTGetHWNDFocus();
-HWND      WINAPI DXUTGetHWNDDeviceFullScreen();
-HWND      WINAPI DXUTGetHWNDDeviceWindowed();
-RECT      WINAPI DXUTGetWindowClientRect();
-LONG      WINAPI DXUTGetWindowWidth();
-LONG      WINAPI DXUTGetWindowHeight();
-RECT      WINAPI DXUTGetWindowClientRectAtModeChange(); // Useful for returning to windowed mode with the same resolution as before toggle to full screen mode
-RECT      WINAPI DXUTGetFullsceenClientRectAtModeChange(); // Useful for returning to full screen mode with the same resolution as before toggle to windowed mode
-double    WINAPI DXUTGetTime();
-float     WINAPI DXUTGetElapsedTime();
-bool      WINAPI DXUTIsWindowed();
-bool	  WINAPI DXUTIsInGammaCorrectMode();
-float     WINAPI DXUTGetFPS();
-LPCWSTR   WINAPI DXUTGetWindowTitle();
-LPCWSTR   WINAPI DXUTGetFrameStats( _In_ bool bIncludeFPS = false );
-LPCWSTR   WINAPI DXUTGetDeviceStats();
-
-bool      WINAPI DXUTIsVsyncEnabled();
-bool      WINAPI DXUTIsRenderingPaused();
-bool      WINAPI DXUTIsTimePaused();
-bool      WINAPI DXUTIsActive();
-int       WINAPI DXUTGetExitCode();
-bool      WINAPI DXUTGetShowMsgBoxOnError();
-bool      WINAPI DXUTGetAutomation();  // Returns true if -automation parameter is used to launch the app
-bool      WINAPI DXUTIsKeyDown( _In_ BYTE vKey ); // Pass a virtual-key code, ex. VK_F1, 'A', VK_RETURN, VK_LSHIFT, etc
-bool      WINAPI DXUTWasKeyPressed( _In_ BYTE vKey );  // Like DXUTIsKeyDown() but return true only if the key was just pressed
-bool      WINAPI DXUTIsMouseButtonDown( _In_ BYTE vButton ); // Pass a virtual-key code: VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, VK_XBUTTON2
-HRESULT   WINAPI DXUTCreateState(); // Optional method to create DXUT's memory.  If its not called by the application it will be automatically called when needed
-void      WINAPI DXUTDestroyState(); // Optional method to destroy DXUT's memory.  If its not called by the application it will be automatically called after the application exits WinMain 
+DXUTDeviceSettings DXUT_API WINAPI DXUTGetDeviceSettings();
+HINSTANCE DXUT_API WINAPI DXUTGetHINSTANCE();
+HWND      DXUT_API WINAPI DXUTGetHWND();
+HWND      DXUT_API WINAPI DXUTGetHWNDFocus();
+HWND      DXUT_API WINAPI DXUTGetHWNDDeviceFullScreen();
+HWND      DXUT_API WINAPI DXUTGetHWNDDeviceWindowed();
+RECT      DXUT_API WINAPI DXUTGetWindowClientRect();
+LONG      DXUT_API WINAPI DXUTGetWindowWidth();
+LONG      DXUT_API WINAPI DXUTGetWindowHeight();
+RECT      DXUT_API WINAPI DXUTGetWindowClientRectAtModeChange(); // Useful for returning to windowed mode with the same resolution as before toggle to full screen mode
+RECT      DXUT_API WINAPI DXUTGetFullsceenClientRectAtModeChange(); // Useful for returning to full screen mode with the same resolution as before toggle to windowed mode
+double    DXUT_API WINAPI DXUTGetTime();
+float     DXUT_API WINAPI DXUTGetElapsedTime();
+bool      DXUT_API WINAPI DXUTIsWindowed();
+bool	  DXUT_API WINAPI DXUTIsInGammaCorrectMode();
+float     DXUT_API WINAPI DXUTGetFPS();
+LPCWSTR   DXUT_API WINAPI DXUTGetWindowTitle();
+LPCWSTR   DXUT_API WINAPI DXUTGetFrameStats( _In_ bool bIncludeFPS = false );
+LPCWSTR   DXUT_API WINAPI DXUTGetDeviceStats();
+
+bool      DXUT_API WINAPI DXUTIsVsyncEnabled();
+bool      DXUT_API WINAPI DXUTIsRenderingPaused();
+bool      DXUT_API WINAPI DXUTIsTimePaused();
+bool      DXUT_API WINAPI DXUTIsActive();
+int       DXUT_API WINAPI DXUTGetExitCode();
+bool      DXUT_API WINAPI DXUTGetShowMsgBoxOnError();
+bool      DXUT_API WINAPI DXUTGetAutomation();  // Returns true if -automation parameter is used to launch the app
+bool      DXUT_API WINAPI DXUTIsKeyDown( _In_ BYTE vKey ); // Pass a virtual-key code, ex. VK_F1, 'A', VK_RETURN, VK_LSHIFT, etc
+bool      DXUT_API WINAPI DXUTWasKeyPressed( _In_ BYTE vKey );  // Like DXUTIsKeyDown() but return true only if the key was just pressed
+bool      DXUT_API WINAPI DXUTIsMouseButtonDown( _In_ BYTE vButton ); // Pass a virtual-key code: VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, VK_XBUTTON2
+HRESULT   DXUT_API WINAPI DXUTCreateState(); // Optional method to create DXUT's memory.  If its not called by the application it will be automatically called when needed
+void      DXUT_API WINAPI DXUTDestroyState(); // Optional method to destroy DXUT's memory.  If its not called by the application it will be automatically called after the application exits WinMain 
 
 //--------------------------------------------------------------------------------------
 // DXUT core layer includes
diff --git a/Core/DXUTDevice11.h b/Core/DXUTDevice11.h
index 1e38a63..e607463 100644
--- a/Core/DXUTDevice11.h
+++ b/Core/DXUTDevice11.h
@@ -14,12 +14,14 @@
 //--------------------------------------------------------------------------------------
 #pragma once
 
-void DXUTApplyDefaultDeviceSettings(DXUTDeviceSettings *modifySettings);
+#pragma warning(disable: 4251)
+
+DXUT_API void DXUTApplyDefaultDeviceSettings(DXUTDeviceSettings *modifySettings);
 
 //--------------------------------------------------------------------------------------
 // Functions to get bit depth from formats
 //--------------------------------------------------------------------------------------
-HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UINT Output, _Out_ DXGI_MODE_DESC* pModeDesc ); 
+DXUT_API HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UINT Output, _Out_ DXGI_MODE_DESC* pModeDesc );
 
 
 
@@ -28,7 +30,7 @@ HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UI
 // Optional memory create/destory functions.  If not call, these will be called automatically
 //--------------------------------------------------------------------------------------
 HRESULT WINAPI DXUTCreateD3D11Enumeration();
-void WINAPI DXUTDestroyD3D11Enumeration();
+DXUT_API void WINAPI DXUTDestroyD3D11Enumeration();
 
 
 
@@ -46,7 +48,7 @@ struct CD3D11EnumDeviceSettingsCombo;
 //--------------------------------------------------------------------------------------
 // Enumerates available Direct3D11 adapters, devices, modes, etc.
 //--------------------------------------------------------------------------------------
-class CD3D11Enumeration
+class DXUT_API CD3D11Enumeration
 {
 public:
     // These should be called before Enumerate(). 
@@ -106,7 +108,7 @@ private:
     void ClearAdapterInfoList();
 };
 
-CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = false, _In_ bool EnumerateAllAdapterFormats = true, _In_ D3D_FEATURE_LEVEL forceFL = ((D3D_FEATURE_LEVEL )0)  );
+DXUT_API CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = false, _In_ bool EnumerateAllAdapterFormats = true, _In_ D3D_FEATURE_LEVEL forceFL = ((D3D_FEATURE_LEVEL )0)  );
 
 
 #define DXGI_MAX_DEVICE_IDENTIFIER_STRING 128
@@ -115,7 +117,7 @@ CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = fa
 // A class describing an adapter which contains a unique adapter ordinal 
 // that is installed on the system
 //--------------------------------------------------------------------------------------
-class CD3D11EnumAdapterInfo
+class DXUT_API CD3D11EnumAdapterInfo
 {
     const CD3D11EnumAdapterInfo &operator = ( const CD3D11EnumAdapterInfo &rhs );
 
@@ -144,7 +146,7 @@ public:
 };
 
 
-class CD3D11EnumOutputInfo
+class DXUT_API CD3D11EnumOutputInfo
 {
     const CD3D11EnumOutputInfo &operator = ( const CD3D11EnumOutputInfo &rhs );
 
@@ -167,7 +169,7 @@ public:
 //--------------------------------------------------------------------------------------
 // A class describing a Direct3D11 device that contains a unique supported driver type
 //--------------------------------------------------------------------------------------
-class CD3D11EnumDeviceInfo
+class DXUT_API CD3D11EnumDeviceInfo
 {
     const CD3D11EnumDeviceInfo& operator =( const CD3D11EnumDeviceInfo& rhs );
 
@@ -187,7 +189,7 @@ public:
 // adapter format, back buffer format, and windowed that is compatible with a 
 // particular Direct3D device and the app.
 //--------------------------------------------------------------------------------------
-struct CD3D11EnumDeviceSettingsCombo
+struct DXUT_API CD3D11EnumDeviceSettingsCombo
 {
     UINT AdapterOrdinal;
     D3D_DRIVER_TYPE DeviceType;
@@ -203,7 +205,7 @@ struct CD3D11EnumDeviceSettingsCombo
     CD3D11EnumOutputInfo* pOutputInfo;
 };
 
-float   DXUTRankD3D11DeviceCombo( _In_ CD3D11EnumDeviceSettingsCombo* pDeviceSettingsCombo, 
+float DXUT_API DXUTRankD3D11DeviceCombo( _In_ CD3D11EnumDeviceSettingsCombo* pDeviceSettingsCombo,
                                   _In_ DXUTD3D11DeviceSettings* pOptimalDeviceSettings, 
                                   _Out_ int &bestModeIndex,
                                   _Out_ int &bestMSAAIndex
diff --git a/Core/DXUT_2015.vcxproj b/Core/DXUT_2015.vcxproj
index 6d6c522..62b0708 100644
--- a/Core/DXUT_2015.vcxproj
+++ b/Core/DXUT_2015.vcxproj
@@ -34,35 +34,35 @@
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|X64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
@@ -147,7 +147,7 @@
       <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
@@ -156,7 +156,7 @@
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <LargeAddressAware>true</LargeAddressAware>
@@ -188,7 +188,7 @@
       <FloatingPointModel>Fast</FloatingPointModel>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
       <PrecompiledHeader>Use</PrecompiledHeader>
@@ -196,7 +196,7 @@
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <LargeAddressAware>true</LargeAddressAware>
@@ -230,14 +230,14 @@
       <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
       <PrecompiledHeader>Use</PrecompiledHeader>
       <PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -272,14 +272,14 @@
       <FloatingPointModel>Fast</FloatingPointModel>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
       <PrecompiledHeader>Use</PrecompiledHeader>
       <PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -315,14 +315,14 @@
       <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
       <PrecompiledHeader>Use</PrecompiledHeader>
       <PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -357,14 +357,14 @@
       <FloatingPointModel>Fast</FloatingPointModel>
       <ExceptionHandling>Sync</ExceptionHandling>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
       <PrecompiledHeader>Use</PrecompiledHeader>
       <PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
       <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
diff --git a/Core/DXUTmisc.h b/Core/DXUTmisc.h
index 9706ccc..74ab666 100644
--- a/Core/DXUTmisc.h
+++ b/Core/DXUTmisc.h
@@ -62,23 +62,23 @@ struct DXUT_GAMEPAD
     bool bLastRightTrigger;
 };
 
-HRESULT DXUTGetGamepadState( _In_ DWORD dwPort, _In_ DXUT_GAMEPAD* pGamePad, _In_ bool bThumbstickDeadZone = true,
+HRESULT DXUT_API DXUTGetGamepadState( _In_ DWORD dwPort, _In_ DXUT_GAMEPAD* pGamePad, _In_ bool bThumbstickDeadZone = true,
                              _In_ bool bSnapThumbstickToCardinals = true );
-HRESULT DXUTStopRumbleOnAllControllers();
-void DXUTEnableXInput( _In_ bool bEnable );
+HRESULT DXUT_API DXUTStopRumbleOnAllControllers();
+void DXUT_API DXUTEnableXInput( _In_ bool bEnable );
 
 
 //--------------------------------------------------------------------------------------
 // Takes a screen shot of a 32bit D3D11 back buffer and saves the images to a BMP or DDS file
 //--------------------------------------------------------------------------------------
 
-HRESULT DXUTSnapD3D11Screenshot( _In_z_ LPCWSTR szFileName, _In_ bool usedds = true );
+HRESULT DXUT_API DXUTSnapD3D11Screenshot( _In_z_ LPCWSTR szFileName, _In_ bool usedds = true );
 
 //--------------------------------------------------------------------------------------
 // Performs timer operations
 // Use DXUTGetGlobalTimer() to get the global instance
 //--------------------------------------------------------------------------------------
-class CDXUTTimer
+class DXUT_API CDXUTTimer
 {
 public:
     CDXUTTimer();
@@ -109,24 +109,24 @@ protected:
     LONGLONG m_llBaseTime;
 };
 
-CDXUTTimer*                 WINAPI DXUTGetGlobalTimer();
+DXUT_API CDXUTTimer*                 WINAPI DXUTGetGlobalTimer();
 
 
 //--------------------------------------------------------------------------------------
 // Returns the string for the given DXGI_FORMAT.
 //       bWithPrefix determines whether the string should include the "DXGI_FORMAT_"
 //--------------------------------------------------------------------------------------
-LPCWSTR WINAPI DXUTDXGIFormatToString( _In_ DXGI_FORMAT format, _In_ bool bWithPrefix );
+DXUT_API LPCWSTR WINAPI DXUTDXGIFormatToString( _In_ DXGI_FORMAT format, _In_ bool bWithPrefix );
 
 
 //--------------------------------------------------------------------------------------
 // Debug printing support
 // See dxerr.h for more debug printing support
 //--------------------------------------------------------------------------------------
-void WINAPI DXUTOutputDebugStringW( _In_z_ LPCWSTR strMsg, ... );
-void WINAPI DXUTOutputDebugStringA( _In_z_ LPCSTR strMsg, ... );
-HRESULT WINAPI DXUTTrace( _In_z_ const CHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_z_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
-const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
+DXUT_API void WINAPI DXUTOutputDebugStringW( _In_z_ LPCWSTR strMsg, ... );
+DXUT_API void WINAPI DXUTOutputDebugStringA( _In_z_ LPCSTR strMsg, ... );
+DXUT_API HRESULT WINAPI DXUTTrace( _In_z_ const CHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_z_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
+DXUT_API const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
 
 #ifdef UNICODE
 #define DXUTOutputDebugString DXUTOutputDebugStringW
@@ -152,17 +152,17 @@ const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
 // failure if APIs are not present.
 //--------------------------------------------------------------------------------------
 
-int WINAPI DXUT_Dynamic_D3DPERF_BeginEvent( _In_ DWORD col, _In_z_ LPCWSTR wszName );
-int WINAPI DXUT_Dynamic_D3DPERF_EndEvent( void );
-void WINAPI DXUT_Dynamic_D3DPERF_SetMarker( _In_ DWORD col, _In_z_ LPCWSTR wszName );
-void WINAPI DXUT_Dynamic_D3DPERF_SetRegion( _In_ DWORD col, _In_z_ LPCWSTR wszName );
-BOOL WINAPI DXUT_Dynamic_D3DPERF_QueryRepeatFrame( void );
-void WINAPI DXUT_Dynamic_D3DPERF_SetOptions( _In_ DWORD dwOptions );
-DWORD WINAPI DXUT_Dynamic_D3DPERF_GetStatus();
-HRESULT WINAPI DXUT_Dynamic_CreateDXGIFactory1( _In_ REFIID rInterface, _Out_ void** ppOut );
-HRESULT WINAPI DXUT_Dynamic_DXGIGetDebugInterface( _In_ REFIID rInterface, _Out_ void** ppOut );
-
-HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
+DXUT_API int WINAPI DXUT_Dynamic_D3DPERF_BeginEvent( _In_ DWORD col, _In_z_ LPCWSTR wszName );
+DXUT_API int WINAPI DXUT_Dynamic_D3DPERF_EndEvent( void );
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetMarker( _In_ DWORD col, _In_z_ LPCWSTR wszName );
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetRegion( _In_ DWORD col, _In_z_ LPCWSTR wszName );
+DXUT_API BOOL WINAPI DXUT_Dynamic_D3DPERF_QueryRepeatFrame( void );
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetOptions( _In_ DWORD dwOptions );
+DXUT_API DWORD WINAPI DXUT_Dynamic_D3DPERF_GetStatus();
+DXUT_API HRESULT WINAPI DXUT_Dynamic_CreateDXGIFactory1( _In_ REFIID rInterface, _Out_ void** ppOut );
+DXUT_API HRESULT WINAPI DXUT_Dynamic_DXGIGetDebugInterface( _In_ REFIID rInterface, _Out_ void** ppOut );
+
+DXUT_API HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
                                                _In_ D3D_DRIVER_TYPE DriverType,
                                                _In_opt_ HMODULE Software,
                                                _In_ UINT32 Flags,
@@ -173,7 +173,7 @@ HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
                                                _Out_opt_ D3D_FEATURE_LEVEL* pFeatureLevel,
                                                _Out_opt_ ID3D11DeviceContext** ppImmediateContext );
 
-bool DXUT_EnsureD3D11APIs();
+DXUT_API bool DXUT_EnsureD3D11APIs();
 
 
 //--------------------------------------------------------------------------------------
@@ -285,14 +285,14 @@ typedef MONITORINFOEXW      MONITORINFOEX;
 typedef LPMONITORINFOEXW    LPMONITORINFOEX;
 #endif
 
-HMONITOR WINAPI DXUTMonitorFromWindow( _In_ HWND hWnd, _In_ DWORD dwFlags );
-HMONITOR WINAPI DXUTMonitorFromRect( _In_ LPCRECT lprcScreenCoords, _In_ DWORD dwFlags );
-BOOL WINAPI DXUTGetMonitorInfo( _In_ HMONITOR hMonitor, _Out_ LPMONITORINFO lpMonitorInfo );
-void WINAPI DXUTGetDesktopResolution( _In_ UINT AdapterOrdinal, _Out_ UINT* pWidth, _Out_ UINT* pHeight );
+DXUT_API HMONITOR WINAPI DXUTMonitorFromWindow( _In_ HWND hWnd, _In_ DWORD dwFlags );
+DXUT_API HMONITOR WINAPI DXUTMonitorFromRect( _In_ LPCRECT lprcScreenCoords, _In_ DWORD dwFlags );
+DXUT_API BOOL WINAPI DXUTGetMonitorInfo( _In_ HMONITOR hMonitor, _Out_ LPMONITORINFO lpMonitorInfo );
+DXUT_API void WINAPI DXUTGetDesktopResolution( _In_ UINT AdapterOrdinal, _Out_ UINT* pWidth, _Out_ UINT* pHeight );
 
 
 //--------------------------------------------------------------------------------------
 // Helper functions to create SRGB formats from typeless formats and vice versa
 //--------------------------------------------------------------------------------------
-DXGI_FORMAT MAKE_SRGB( _In_ DXGI_FORMAT format );
-DXGI_FORMAT MAKE_TYPELESS( _In_ DXGI_FORMAT format );
+DXUT_API DXGI_FORMAT MAKE_SRGB( _In_ DXGI_FORMAT format );
+DXUT_API DXGI_FORMAT MAKE_TYPELESS( _In_ DXGI_FORMAT format );
diff --git a/Core/ScreenGrab.h b/Core/ScreenGrab.h
index d643073..cf4eba6 100644
--- a/Core/ScreenGrab.h
+++ b/Core/ScreenGrab.h
@@ -27,14 +27,20 @@
 #include <stdint.h>
 #include <functional>
 
+#ifdef DXUT_EXPORT
+	#define DXUT_API __declspec(dllexport)
+#else
+	#define DXUT_API __declspec(dllimport)
+#endif
+
 
 namespace DirectX
 {
-    HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
+	DXUT_API HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
                                   _In_ ID3D11Resource* pSource,
                                   _In_z_ LPCWSTR fileName );
 
-    HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
+	DXUT_API HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
                                   _In_ ID3D11Resource* pSource,
                                   _In_ REFGUID guidContainerFormat, 
                                   _In_z_ LPCWSTR fileName,
diff --git a/Core/WICTextureLoader.h b/Core/WICTextureLoader.h
index 2b0340c..f2edacf 100644
--- a/Core/WICTextureLoader.h
+++ b/Core/WICTextureLoader.h
@@ -30,11 +30,17 @@
 #include <d3d11_1.h>
 #include <stdint.h>
 
+#ifdef DXUT_EXPORT
+	#define DXUT_API __declspec(dllexport)
+#else
+	#define DXUT_API __declspec(dllimport)
+#endif
+
 
 namespace DirectX
 {
     // Standard version
-    HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
                                         _In_reads_bytes_(wicDataSize) const uint8_t* wicData,
                                         _In_ size_t wicDataSize,
                                         _Out_opt_ ID3D11Resource** texture,
@@ -42,7 +48,7 @@ namespace DirectX
                                         _In_ size_t maxsize = 0
                                       );
 
-    HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
                                       _In_z_ const wchar_t* szFileName,
                                       _Out_opt_ ID3D11Resource** texture,
                                       _Out_opt_ ID3D11ShaderResourceView** textureView,
@@ -50,7 +56,7 @@ namespace DirectX
                                     );
 
     // Standard version with optional auto-gen mipmap support
-    HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
                                         _In_opt_ ID3D11DeviceContext* d3dContext,
                                         _In_reads_bytes_(wicDataSize) const uint8_t* wicData,
                                         _In_ size_t wicDataSize,
@@ -59,7 +65,7 @@ namespace DirectX
                                         _In_ size_t maxsize = 0
                                       );
 
-    HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
                                       _In_opt_ ID3D11DeviceContext* d3dContext,
                                       _In_z_ const wchar_t* szFileName,
                                       _Out_opt_ ID3D11Resource** texture,
@@ -68,7 +74,7 @@ namespace DirectX
                                     );
 
     // Extended version
-    HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
                                           _In_reads_bytes_(wicDataSize) const uint8_t* wicData,
                                           _In_ size_t wicDataSize,
                                           _In_ size_t maxsize,
@@ -81,7 +87,7 @@ namespace DirectX
                                           _Out_opt_ ID3D11ShaderResourceView** textureView
                                       );
 
-    HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
                                         _In_z_ const wchar_t* szFileName,
                                         _In_ size_t maxsize,
                                         _In_ D3D11_USAGE usage,
@@ -94,7 +100,7 @@ namespace DirectX
                                     );
 
     // Extended version with optional auto-gen mipmap support
-    HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
                                           _In_opt_ ID3D11DeviceContext* d3dContext,
                                           _In_reads_bytes_(wicDataSize) const uint8_t* wicData,
                                           _In_ size_t wicDataSize,
@@ -108,7 +114,7 @@ namespace DirectX
                                           _Out_opt_ ID3D11ShaderResourceView** textureView
                                       );
 
-    HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
+	DXUT_API HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
                                         _In_opt_ ID3D11DeviceContext* d3dContext,
                                         _In_z_ const wchar_t* szFileName,
                                         _In_ size_t maxsize,
diff --git a/Core/dxerr.h b/Core/dxerr.h
index 39e348d..9616dea 100644
--- a/Core/dxerr.h
+++ b/Core/dxerr.h
@@ -25,7 +25,7 @@ extern "C" {
 //--------------------------------------------------------------------------------------
 // DXGetErrorString
 //--------------------------------------------------------------------------------------
-const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
+DXUT_API const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
 
 #define DXGetErrorString DXGetErrorStringW
 
@@ -33,7 +33,7 @@ const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
 // DXGetErrorDescription has to be modified to return a copy in a buffer rather than
 // the original static string.
 //--------------------------------------------------------------------------------------
-void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
+void DXUT_API WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
 
 #define DXGetErrorDescription DXGetErrorDescriptionW
 
@@ -52,7 +52,7 @@ void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* des
 //
 //  Return: The hr that was passed in.  
 //--------------------------------------------------------------------------------------
-HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
+HRESULT DXUT_API WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
 
 #define DXTrace DXTraceW