From 5dd4ffa1fb763e1261e944e893166314c5b58d50 Mon Sep 17 00:00:00 2001
From: Shon Ferguson <shonferg@users.sourceforge.net>
Date: Wed, 7 Jun 2006 21:27:13 +0000
Subject: [PATCH] Made DLL creation optional and added a "Release - DLL"
 configuration.  The Release configuration creates a static library.

---
 Type.h                                   | 14 ++--
 gen/AVObject.h                           |  2 +-
 gen/Bones.h                              |  2 +-
 gen/BoundingBox.h                        |  2 +-
 gen/ByteArray.h                          |  2 +-
 gen/ControllerLink.h                     |  2 +-
 gen/Footer.h                             |  2 +-
 gen/FurniturePosition.h                  |  2 +-
 gen/Header.h                             |  2 +-
 gen/KeyGroup.h                           |  2 +-
 gen/LODRange.h                           |  2 +-
 gen/LimitedHingeDescriptor.h             |  2 +-
 gen/MatchGroup.h                         |  2 +-
 gen/MipMap.h                             |  2 +-
 gen/Morph.h                              |  2 +-
 gen/NodeGroup.h                          |  2 +-
 gen/Particle.h                           |  2 +-
 gen/QuaternionXYZW.h                     |  2 +-
 gen/RagDollDescriptor.h                  |  2 +-
 gen/RotationKeyArray.h                   |  2 +-
 gen/ShaderTexDesc.h                      |  2 +-
 gen/ShortString.h                        |  2 +-
 gen/SkinData.h                           |  2 +-
 gen/SkinPartition.h                      |  2 +-
 gen/SkinShape.h                          |  2 +-
 gen/SkinShapeGroup.h                     |  2 +-
 gen/SkinWeight.h                         |  2 +-
 gen/StringPalette.h                      |  2 +-
 gen/TBC.h                                |  2 +-
 gen/TexDesc.h                            |  2 +-
 gen/TexSource.h                          |  2 +-
 gen/hkTriangle.h                         |  2 +-
 nif_math.h                               | 94 +++++++++++-----------
 niflib.cpp                               | 11 ++-
 niflib.h                                 | 20 ++---
 niflib.sln                               |  4 +
 niflib.vcproj                            | 99 ++++++++++++++++++++----
 obj/ABoneLODController.h                 |  2 +-
 obj/AKeyedData.h                         |  2 +-
 obj/APSysCtlr.h                          |  2 +-
 obj/APSysData.h                          |  2 +-
 obj/AParticleModifier.h                  |  2 +-
 obj/AbhkConstraint.h                     |  2 +-
 obj/AbhkRagdollConstraint.h              |  2 +-
 obj/AbhkShapeCollection.h                |  2 +-
 obj/AvoidNode.h                          |  2 +-
 obj/BSBound.h                            |  2 +-
 obj/BSFurnitureMarker.h                  |  2 +-
 obj/BSKeyframeController.h               |  2 +-
 obj/BSPSysArrayEmitter.h                 |  2 +-
 obj/BSParentVelocityModifier.h           |  2 +-
 obj/BSXFlags.h                           |  2 +-
 obj/FxButton.h                           |  2 +-
 obj/FxRadioButton.h                      |  2 +-
 obj/FxWidget.h                           |  2 +-
 obj/NiAVObject.h                         |  2 +-
 obj/NiAlphaController.h                  |  2 +-
 obj/NiAlphaProperty.h                    |  2 +-
 obj/NiAmbientLight.h                     |  2 +-
 obj/NiAutoNormalParticles.h              |  2 +-
 obj/NiAutoNormalParticlesData.h          |  2 +-
 obj/NiBSAnimationNode.h                  |  2 +-
 obj/NiBSBoneLODController.h              |  2 +-
 obj/NiBSPArrayController.h               |  2 +-
 obj/NiBSParticleNode.h                   |  2 +-
 obj/NiBSplineBasisData.h                 |  2 +-
 obj/NiBSplineCompFloatInterpolator.h     |  2 +-
 obj/NiBSplineCompPoint3Interpolator.h    |  2 +-
 obj/NiBSplineCompTransformInterpolator.h |  2 +-
 obj/NiBSplineInterpolator.h              |  2 +-
 obj/NiBillboardNode.h                    |  2 +-
 obj/NiBinaryExtraData.h                  |  2 +-
 obj/NiBlendBoolInterpolator.h            |  2 +-
 obj/NiBlendFloatInterpolator.h           |  2 +-
 obj/NiBlendInterpolator.h                |  2 +-
 obj/NiBlendPoint3Interpolator.h          |  2 +-
 obj/NiBlendTransformInterpolator.h       |  2 +-
 obj/NiBoneLODController.h                |  2 +-
 obj/NiBoolData.h                         |  2 +-
 obj/NiBoolInterpolator.h                 |  2 +-
 obj/NiBoolTimelineInterpolator.h         |  2 +-
 obj/NiBooleanExtraData.h                 |  2 +-
 obj/NiCamera.h                           |  2 +-
 obj/NiCollisionData.h                    |  2 +-
 obj/NiCollisionObject.h                  |  2 +-
 obj/NiColorData.h                        |  2 +-
 obj/NiColorExtraData.h                   |  2 +-
 obj/NiControllerManager.h                |  2 +-
 obj/NiControllerSequence.h               |  2 +-
 obj/NiDefaultAVObjectPalette.h           |  2 +-
 obj/NiDirectionalLight.h                 |  2 +-
 obj/NiDitherProperty.h                   |  2 +-
 obj/NiDynamicEffect.h                    |  2 +-
 obj/NiExtraData.h                        |  2 +-
 obj/NiFlipController.h                   |  2 +-
 obj/NiFloatData.h                        |  2 +-
 obj/NiFloatExtraData.h                   |  2 +-
 obj/NiFloatExtraDataController.h         |  2 +-
 obj/NiFloatInterpolator.h                |  2 +-
 obj/NiFloatsExtraData.h                  |  2 +-
 obj/NiFogProperty.h                      |  2 +-
 obj/NiGeomMorpherController.h            |  2 +-
 obj/NiGravity.h                          |  2 +-
 obj/NiIntegerExtraData.h                 |  2 +-
 obj/NiIntegersExtraData.h                |  2 +-
 obj/NiInterpolator.h                     |  2 +-
 obj/NiKeyframeController.h               |  2 +-
 obj/NiKeyframeData.h                     |  2 +-
 obj/NiLODNode.h                          |  2 +-
 obj/NiLight.h                            |  2 +-
 obj/NiLightColorController.h             |  2 +-
 obj/NiLightDimmerController.h            |  2 +-
 obj/NiLookAtController.h                 |  2 +-
 obj/NiLookAtInterpolator.h               |  2 +-
 obj/NiMaterialColorController.h          |  2 +-
 obj/NiMaterialProperty.h                 |  2 +-
 obj/NiMeshPSysData.h                     |  2 +-
 obj/NiMeshParticleSystem.h               |  2 +-
 obj/NiMorphData.h                        |  2 +-
 obj/NiMultiTargetTransformController.h   |  2 +-
 obj/NiNode.h                             |  2 +-
 obj/NiObject.h                           | 50 ++++++------
 obj/NiObjectNET.h                        |  2 +-
 obj/NiPSysAgeDeathModifier.h             |  2 +-
 obj/NiPSysBombModifier.h                 |  2 +-
 obj/NiPSysBoundUpdateModifier.h          |  2 +-
 obj/NiPSysBoxEmitter.h                   |  2 +-
 obj/NiPSysColliderManager.h              |  2 +-
 obj/NiPSysColorModifier.h                |  2 +-
 obj/NiPSysCylinderEmitter.h              |  2 +-
 obj/NiPSysData.h                         |  2 +-
 obj/NiPSysDragModifier.h                 |  2 +-
 obj/NiPSysEmitter.h                      |  2 +-
 obj/NiPSysEmitterCtlr.h                  |  2 +-
 obj/NiPSysEmitterCtlrData.h              |  2 +-
 obj/NiPSysEmitterDeclinationCtlr.h       |  2 +-
 obj/NiPSysEmitterDeclinationVarCtlr.h    |  2 +-
 obj/NiPSysEmitterInitialRadiusCtlr.h     |  2 +-
 obj/NiPSysEmitterLifeSpanCtlr.h          |  2 +-
 obj/NiPSysEmitterSpeedCtlr.h             |  2 +-
 obj/NiPSysGravityModifier.h              |  2 +-
 obj/NiPSysGravityStrengthCtlr.h          |  2 +-
 obj/NiPSysGrowFadeModifier.h             |  2 +-
 obj/NiPSysMeshEmitter.h                  |  2 +-
 obj/NiPSysMeshUpdateModifier.h           |  2 +-
 obj/NiPSysModifier.h                     |  2 +-
 obj/NiPSysModifierActiveCtlr.h           |  2 +-
 obj/NiPSysPlanarCollider.h               |  2 +-
 obj/NiPSysPositionModifier.h             |  2 +-
 obj/NiPSysResetOnLoopCtlr.h              |  2 +-
 obj/NiPSysRotationModifier.h             |  2 +-
 obj/NiPSysSpawnModifier.h                |  2 +-
 obj/NiPSysSphereEmitter.h                |  2 +-
 obj/NiPSysUpdateCtlr.h                   |  2 +-
 obj/NiPSysVolumeEmitter.h                |  2 +-
 obj/NiPalette.h                          |  2 +-
 obj/NiParticleBomb.h                     |  2 +-
 obj/NiParticleColorModifier.h            |  2 +-
 obj/NiParticleGrowFade.h                 |  2 +-
 obj/NiParticleMeshModifier.h             |  2 +-
 obj/NiParticleMeshes.h                   |  2 +-
 obj/NiParticleMeshesData.h               |  2 +-
 obj/NiParticleRotation.h                 |  2 +-
 obj/NiParticleSystem.h                   |  2 +-
 obj/NiParticleSystemController.h         |  2 +-
 obj/NiParticles.h                        |  2 +-
 obj/NiParticlesData.h                    |  2 +-
 obj/NiPathController.h                   |  2 +-
 obj/NiPathInterpolator.h                 |  2 +-
 obj/NiPixelData.h                        |  2 +-
 obj/NiPlanarCollider.h                   |  2 +-
 obj/NiPoint3Interpolator.h               |  2 +-
 obj/NiPointLight.h                       |  2 +-
 obj/NiPosData.h                          |  2 +-
 obj/NiProperty.h                         |  2 +-
 obj/NiRangeLODData.h                     |  2 +-
 obj/NiRotatingParticles.h                |  2 +-
 obj/NiRotatingParticlesData.h            |  2 +-
 obj/NiScreenLODData.h                    |  2 +-
 obj/NiSequenceStreamHelper.h             |  2 +-
 obj/NiShadeProperty.h                    |  2 +-
 obj/NiSingleInterpolatorController.h     |  2 +-
 obj/NiSkinData.h                         |  2 +-
 obj/NiSkinInstance.h                     |  2 +-
 obj/NiSkinPartition.h                    |  2 +-
 obj/NiSourceTexture.h                    |  2 +-
 obj/NiSpecularProperty.h                 |  2 +-
 obj/NiSphericalCollider.h                |  2 +-
 obj/NiSpotLight.h                        |  2 +-
 obj/NiStencilProperty.h                  |  2 +-
 obj/NiStringExtraData.h                  |  2 +-
 obj/NiStringPalette.h                    |  2 +-
 obj/NiStringsExtraData.h                 |  2 +-
 obj/NiTextKeyExtraData.h                 |  2 +-
 obj/NiTextureEffect.h                    |  2 +-
 obj/NiTextureTransformController.h       |  2 +-
 obj/NiTexturingProperty.cpp              |  3 +
 obj/NiTexturingProperty.h                |  2 +-
 obj/NiTimeController.h                   |  2 +-
 obj/NiTransformController.h              |  2 +-
 obj/NiTransformData.h                    |  2 +-
 obj/NiTransformInterpolator.h            |  2 +-
 obj/NiTriBasedGeom.h                     |  2 +-
 obj/NiTriBasedGeomData.h                 |  2 +-
 obj/NiTriShape.h                         |  2 +-
 obj/NiTriShapeData.h                     |  2 +-
 obj/NiTriStrips.h                        |  2 +-
 obj/NiTriStripsData.h                    |  2 +-
 obj/NiUVController.h                     |  2 +-
 obj/NiUVData.h                           |  2 +-
 obj/NiVectorExtraData.h                  |  2 +-
 obj/NiVertWeightsExtraData.h             |  2 +-
 obj/NiVertexColorProperty.h              |  2 +-
 obj/NiVisController.h                    |  2 +-
 obj/NiVisData.h                          |  2 +-
 obj/NiWireframeProperty.h                |  2 +-
 obj/NiZBufferProperty.h                  |  2 +-
 obj/RootCollisionNode.h                  |  2 +-
 obj/bhkBlendCollisionObject.h            |  2 +-
 obj/bhkBlendController.h                 |  2 +-
 obj/bhkBoxShape.h                        |  2 +-
 obj/bhkCapsuleShape.h                    |  2 +-
 obj/bhkCollisionObject.h                 |  2 +-
 obj/bhkConvexShape.h                     |  2 +-
 obj/bhkConvexTransformShape.h            |  2 +-
 obj/bhkConvexVerticesShape.h             |  2 +-
 obj/bhkEntity.h                          |  2 +-
 obj/bhkHingeConstraint.h                 |  2 +-
 obj/bhkLimitedHingeConstraint.h          |  2 +-
 obj/bhkListShape.h                       |  2 +-
 obj/bhkMalleableConstraint.h             |  2 +-
 obj/bhkMoppBvTreeShape.h                 |  2 +-
 obj/bhkMultiSphereShape.h                |  2 +-
 obj/bhkNiTriStripsShape.h                |  2 +-
 obj/bhkPackedNiTriStripsShape.h          |  2 +-
 obj/bhkPrismaticConstraint.h             |  2 +-
 obj/bhkRagdollConstraint.h               |  2 +-
 obj/bhkRefObject.h                       |  2 +-
 obj/bhkRigidBody.h                       |  2 +-
 obj/bhkRigidBodyT.h                      |  2 +-
 obj/bhkSPCollisionObject.h               |  2 +-
 obj/bhkSerializable.h                    |  2 +-
 obj/bhkShape.h                           |  2 +-
 obj/bhkSimpleShapePhantom.h              |  2 +-
 obj/bhkSphereRepShape.h                  |  2 +-
 obj/bhkSphereShape.h                     |  2 +-
 obj/bhkStiffSpringConstraint.h           |  2 +-
 obj/bhkTransformShape.h                  |  2 +-
 obj/bhkWorldObject.h                     |  2 +-
 obj/hkPackedNiTriStripsData.h            |  2 +-
 py_niflib.vcproj                         | 89 +++++++++++++++++++++
 251 files changed, 521 insertions(+), 347 deletions(-)

diff --git a/Type.h b/Type.h
index 44282e3e..364e4196 100644
--- a/Type.h
+++ b/Type.h
@@ -11,16 +11,16 @@ using namespace std;
 /**
  * Run Time Type Inforamtion Class
  */
-class DLLEXPORT Type {
+class Type {
 public:
-	Type (const string & type_name, const Type * par_type );
-	~Type();
+	NIFLIB_API Type (const string & type_name, const Type * par_type );
+	NIFLIB_API ~Type();
 
-	string GetTypeName() const;
+	NIFLIB_API string GetTypeName() const;
 
-	bool IsSameType ( const Type & compare_to ) const;
-	bool IsDerivedType ( const Type & compare_to ) const;
-	bool operator<( const Type & compare_to ) const;
+	NIFLIB_API bool IsSameType ( const Type & compare_to ) const;
+	NIFLIB_API bool IsDerivedType ( const Type & compare_to ) const;
+	NIFLIB_API bool operator<( const Type & compare_to ) const;
 private:
 	string name;
 	const Type * base_type;
diff --git a/gen/AVObject.h b/gen/AVObject.h
index 95f5b5ed..daf775fb 100644
--- a/gen/AVObject.h
+++ b/gen/AVObject.h
@@ -13,7 +13,7 @@ class NiAVObject;
 /*!
  * Used in NiDefaultAVObjectPalette.
  */
-struct DLLEXPORT AVObject {
+struct NIFLIB_API AVObject {
 	/*! Default Constructor */
 	AVObject();
 	/*! Default Destructor */
diff --git a/gen/Bones.h b/gen/Bones.h
index fb327999..8834b774 100644
--- a/gen/Bones.h
+++ b/gen/Bones.h
@@ -14,7 +14,7 @@ class NiNode;
  * This is a list of bone influences.  It points to blocks higher in the
  * hierarchy so ints are used to represent the indices.
  */
-struct DLLEXPORT Bones {
+struct NIFLIB_API Bones {
 	/*! Default Constructor */
 	Bones();
 	/*! Default Destructor */
diff --git a/gen/BoundingBox.h b/gen/BoundingBox.h
index db067df4..697c7465 100644
--- a/gen/BoundingBox.h
+++ b/gen/BoundingBox.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Bounding box.
  */
-struct DLLEXPORT BoundingBox {
+struct NIFLIB_API BoundingBox {
 	/*! Default Constructor */
 	BoundingBox();
 	/*! Default Destructor */
diff --git a/gen/ByteArray.h b/gen/ByteArray.h
index 7377623e..535151c2 100644
--- a/gen/ByteArray.h
+++ b/gen/ByteArray.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * An array of bytes.
  */
-struct DLLEXPORT ByteArray {
+struct NIFLIB_API ByteArray {
 	/*! Default Constructor */
 	ByteArray();
 	/*! Default Destructor */
diff --git a/gen/ControllerLink.h b/gen/ControllerLink.h
index 31935e93..e65fda6d 100644
--- a/gen/ControllerLink.h
+++ b/gen/ControllerLink.h
@@ -18,7 +18,7 @@ class NiStringPalette;
  * that contains the name), and a sequence of interpolators that apply to
  * this controllable block, via links.
  */
-struct DLLEXPORT ControllerLink {
+struct NIFLIB_API ControllerLink {
 	/*! Default Constructor */
 	ControllerLink();
 	/*! Default Destructor */
diff --git a/gen/Footer.h b/gen/Footer.h
index 6d58dce2..2b223aec 100644
--- a/gen/Footer.h
+++ b/gen/Footer.h
@@ -14,7 +14,7 @@ class NiAVObject;
 /*!
  * The NIF file footer.
  */
-struct DLLEXPORT Footer {
+struct NIFLIB_API Footer {
 	/*! Default Constructor */
 	Footer();
 	/*! Default Destructor */
diff --git a/gen/FurniturePosition.h b/gen/FurniturePosition.h
index e8e5ed12..d70ea88d 100644
--- a/gen/FurniturePosition.h
+++ b/gen/FurniturePosition.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Describes a furniture position?
  */
-struct DLLEXPORT FurniturePosition {
+struct NIFLIB_API FurniturePosition {
 	/*! Default Constructor */
 	FurniturePosition();
 	/*! Default Destructor */
diff --git a/gen/Header.h b/gen/Header.h
index 0d07cbcf..0c0fc722 100644
--- a/gen/Header.h
+++ b/gen/Header.h
@@ -12,7 +12,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * The NIF file header.
  */
-struct DLLEXPORT Header {
+struct NIFLIB_API Header {
 	/*! Default Constructor */
 	Header();
 	/*! Default Destructor */
diff --git a/gen/KeyGroup.h b/gen/KeyGroup.h
index b058f0c1..e1f9cfa9 100644
--- a/gen/KeyGroup.h
+++ b/gen/KeyGroup.h
@@ -12,7 +12,7 @@ All rights reserved.  Please see niflib.h for licence. */
  * rotations).
  */
 template <class T >
-struct DLLEXPORT KeyGroup {
+struct NIFLIB_API KeyGroup {
 	/*!
 	 * Number of keys in the array.
 	 */
diff --git a/gen/LODRange.h b/gen/LODRange.h
index 33186122..caf580d7 100644
--- a/gen/LODRange.h
+++ b/gen/LODRange.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * The distance range where a specific level of detail applies.
  */
-struct DLLEXPORT LODRange {
+struct NIFLIB_API LODRange {
 	/*! Default Constructor */
 	LODRange();
 	/*! Default Destructor */
diff --git a/gen/LimitedHingeDescriptor.h b/gen/LimitedHingeDescriptor.h
index 5816d655..0e24fd01 100644
--- a/gen/LimitedHingeDescriptor.h
+++ b/gen/LimitedHingeDescriptor.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * 
  */
-struct DLLEXPORT LimitedHingeDescriptor {
+struct NIFLIB_API LimitedHingeDescriptor {
 	/*! Default Constructor */
 	LimitedHingeDescriptor();
 	/*! Default Destructor */
diff --git a/gen/MatchGroup.h b/gen/MatchGroup.h
index 682cf1da..88a156af 100644
--- a/gen/MatchGroup.h
+++ b/gen/MatchGroup.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Group of vertex indices of vertices that match.
  */
-struct DLLEXPORT MatchGroup {
+struct NIFLIB_API MatchGroup {
 	/*! Default Constructor */
 	MatchGroup();
 	/*! Default Destructor */
diff --git a/gen/MipMap.h b/gen/MipMap.h
index edba0619..067cd6bc 100644
--- a/gen/MipMap.h
+++ b/gen/MipMap.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Description of a MipMap within a NiPixelData block.
  */
-struct DLLEXPORT MipMap {
+struct NIFLIB_API MipMap {
 	/*! Default Constructor */
 	MipMap();
 	/*! Default Destructor */
diff --git a/gen/Morph.h b/gen/Morph.h
index 6bfa1b84..2ab60532 100644
--- a/gen/Morph.h
+++ b/gen/Morph.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Geometry morphing data component.
  */
-struct DLLEXPORT Morph {
+struct NIFLIB_API Morph {
 	/*! Default Constructor */
 	Morph();
 	/*! Default Destructor */
diff --git a/gen/NodeGroup.h b/gen/NodeGroup.h
index 690f9ec8..8eb6ae83 100644
--- a/gen/NodeGroup.h
+++ b/gen/NodeGroup.h
@@ -13,7 +13,7 @@ class NiNode;
 /*!
  * A group of NiNodes references.
  */
-struct DLLEXPORT NodeGroup {
+struct NIFLIB_API NodeGroup {
 	/*! Default Constructor */
 	NodeGroup();
 	/*! Default Destructor */
diff --git a/gen/Particle.h b/gen/Particle.h
index 58a0f49a..e44c2e74 100644
--- a/gen/Particle.h
+++ b/gen/Particle.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * particle array entry
  */
-struct DLLEXPORT Particle {
+struct NIFLIB_API Particle {
 	/*! Default Constructor */
 	Particle();
 	/*! Default Destructor */
diff --git a/gen/QuaternionXYZW.h b/gen/QuaternionXYZW.h
index 8dfbe074..55684223 100644
--- a/gen/QuaternionXYZW.h
+++ b/gen/QuaternionXYZW.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * A quaternion as it appears in the havok blocks.
  */
-struct DLLEXPORT QuaternionXYZW {
+struct NIFLIB_API QuaternionXYZW {
 	/*! Default Constructor */
 	QuaternionXYZW();
 	/*! Default Destructor */
diff --git a/gen/RagDollDescriptor.h b/gen/RagDollDescriptor.h
index 246f8fbc..9e83ec5b 100644
--- a/gen/RagDollDescriptor.h
+++ b/gen/RagDollDescriptor.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * 
  */
-struct DLLEXPORT RagDollDescriptor {
+struct NIFLIB_API RagDollDescriptor {
 	/*! Default Constructor */
 	RagDollDescriptor();
 	/*! Default Destructor */
diff --git a/gen/RotationKeyArray.h b/gen/RotationKeyArray.h
index 79cc3689..c07c0269 100644
--- a/gen/RotationKeyArray.h
+++ b/gen/RotationKeyArray.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
  * Rotation key array.
  */
 template <class T >
-struct DLLEXPORT RotationKeyArray {
+struct NIFLIB_API RotationKeyArray {
 	/*!
 	 * Number of keys.
 	 */
diff --git a/gen/ShaderTexDesc.h b/gen/ShaderTexDesc.h
index 4c29a1b3..e837edb7 100644
--- a/gen/ShaderTexDesc.h
+++ b/gen/ShaderTexDesc.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * An extended texture description for shader textures.
  */
-struct DLLEXPORT ShaderTexDesc {
+struct NIFLIB_API ShaderTexDesc {
 	/*! Default Constructor */
 	ShaderTexDesc();
 	/*! Default Destructor */
diff --git a/gen/ShortString.h b/gen/ShortString.h
index 432a86c3..66f95025 100644
--- a/gen/ShortString.h
+++ b/gen/ShortString.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
  * Another string format, for short strings.  Specific to Bethesda-
  * specific header tags.
  */
-struct DLLEXPORT ShortString {
+struct NIFLIB_API ShortString {
 	/*! Default Constructor */
 	ShortString();
 	/*! Default Destructor */
diff --git a/gen/SkinData.h b/gen/SkinData.h
index a484a11c..aa0cb209 100644
--- a/gen/SkinData.h
+++ b/gen/SkinData.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Skinning data component.
  */
-struct DLLEXPORT SkinData {
+struct NIFLIB_API SkinData {
 	/*! Default Constructor */
 	SkinData();
 	/*! Default Destructor */
diff --git a/gen/SkinPartition.h b/gen/SkinPartition.h
index 4dcc9eb0..a321ca4e 100644
--- a/gen/SkinPartition.h
+++ b/gen/SkinPartition.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
  * Skinning data for a submesh, optimized for hardware skinning. Part of
  * NiSkinPartition.
  */
-struct DLLEXPORT SkinPartition {
+struct NIFLIB_API SkinPartition {
 	/*! Default Constructor */
 	SkinPartition();
 	/*! Default Destructor */
diff --git a/gen/SkinShape.h b/gen/SkinShape.h
index b66fc298..9e84582c 100644
--- a/gen/SkinShape.h
+++ b/gen/SkinShape.h
@@ -14,7 +14,7 @@ class NiSkinInstance;
 /*!
  * Reference to shape and skin instance.
  */
-struct DLLEXPORT SkinShape {
+struct NIFLIB_API SkinShape {
 	/*! Default Constructor */
 	SkinShape();
 	/*! Default Destructor */
diff --git a/gen/SkinShapeGroup.h b/gen/SkinShapeGroup.h
index e9565480..250c0c64 100644
--- a/gen/SkinShapeGroup.h
+++ b/gen/SkinShapeGroup.h
@@ -11,7 +11,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Unknown.
  */
-struct DLLEXPORT SkinShapeGroup {
+struct NIFLIB_API SkinShapeGroup {
 	/*! Default Constructor */
 	SkinShapeGroup();
 	/*! Default Destructor */
diff --git a/gen/SkinWeight.h b/gen/SkinWeight.h
index c974699c..2dfafae9 100644
--- a/gen/SkinWeight.h
+++ b/gen/SkinWeight.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * A weighted vertex.
  */
-struct DLLEXPORT SkinWeight {
+struct NIFLIB_API SkinWeight {
 	/*! Default Constructor */
 	SkinWeight();
 	/*! Default Destructor */
diff --git a/gen/StringPalette.h b/gen/StringPalette.h
index f8098d77..9f3a9c6a 100644
--- a/gen/StringPalette.h
+++ b/gen/StringPalette.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * A list of \\0 terminated strings.
  */
-struct DLLEXPORT StringPalette {
+struct NIFLIB_API StringPalette {
 	/*! Default Constructor */
 	StringPalette();
 	/*! Default Destructor */
diff --git a/gen/TBC.h b/gen/TBC.h
index 9a224229..fa972d75 100644
--- a/gen/TBC.h
+++ b/gen/TBC.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * Tension, bias, continuity.
  */
-struct DLLEXPORT TBC {
+struct NIFLIB_API TBC {
 	/*! Default Constructor */
 	TBC();
 	/*! Default Destructor */
diff --git a/gen/TexDesc.h b/gen/TexDesc.h
index 7bc38d20..12fd17d4 100644
--- a/gen/TexDesc.h
+++ b/gen/TexDesc.h
@@ -13,7 +13,7 @@ class NiSourceTexture;
 /*!
  * Texture description.
  */
-struct DLLEXPORT TexDesc {
+struct NIFLIB_API TexDesc {
 	/*! Default Constructor */
 	TexDesc();
 	/*! Default Destructor */
diff --git a/gen/TexSource.h b/gen/TexSource.h
index 31722499..22f1a237 100644
--- a/gen/TexSource.h
+++ b/gen/TexSource.h
@@ -14,7 +14,7 @@ class NiPixelData;
 /*!
  * A texture source.
  */
-struct DLLEXPORT TexSource {
+struct NIFLIB_API TexSource {
 	/*! Default Constructor */
 	TexSource();
 	/*! Default Destructor */
diff --git a/gen/hkTriangle.h b/gen/hkTriangle.h
index fabe9be8..b897b8ad 100644
--- a/gen/hkTriangle.h
+++ b/gen/hkTriangle.h
@@ -10,7 +10,7 @@ All rights reserved.  Please see niflib.h for licence. */
 /*!
  * A triangle with extra data used for physics.
  */
-struct DLLEXPORT hkTriangle {
+struct NIFLIB_API hkTriangle {
 	/*! Default Constructor */
 	hkTriangle();
 	/*! Default Destructor */
diff --git a/nif_math.h b/nif_math.h
index 80059e89..950eced1 100644
--- a/nif_math.h
+++ b/nif_math.h
@@ -29,7 +29,7 @@ struct Float4;
 struct Matrix44;
 
 /*! Stores 2D texture coordinates – two floating point variables, u and v. */
-struct DLLEXPORT TexCoord {
+struct NIFLIB_API TexCoord {
 	float u; /*!< The U value in this coordinate pair. */ 
 	float v; /*!< The V value in this coordinate pair. */ 
 
@@ -56,7 +56,7 @@ struct DLLEXPORT TexCoord {
 };
 
 /*! Represents a triangle face formed between three vertices referenced by number */
-struct DLLEXPORT Triangle {
+struct NIFLIB_API Triangle {
 	short v1; /*!< The index of the first vertex. */ 
 	short v2; /*!< The index of the second vertex. */ 
 	short v3; /*!< The index of the third vertex. */ 
@@ -109,7 +109,7 @@ struct DLLEXPORT Triangle {
 };
 
 /*!Represents a position or direction in 3D space*/
-struct DLLEXPORT Vector3 {
+struct NIFLIB_API Vector3 {
 	float x; /*!< The X component of this vector. */ 
 	float y; /*!< The Y component of this vector. */ 
 	float z; /*!< The Z component of this vector. */ 
@@ -240,7 +240,7 @@ struct DLLEXPORT Vector3 {
 };
 
 /* Stores two floating point numbers.  Used as a row of a Matrix22 */
-struct DLLEXPORT Float2 {
+struct NIFLIB_API Float2 {
 	float data[2]; /*!< The two floating point numbers stored as an array. */ 
 	
 	/*! The bracket operator makes it possible to use this structure like a C++ array.
@@ -299,15 +299,15 @@ struct Matrix22 {
 	 * \param n The index into the row array.  Should be 0 or 1.
 	 * \return The Float2 structure for the given row index by reference so it can be read or set via the bracket operator.
 	 */
-	DLLEXPORT Float2 & operator[](int n) {
+	NIFLIB_API Float2 & operator[](int n) {
 		return rows[n];
 	}
-	DLLEXPORT const Float2 & operator[](int n) const {
+	NIFLIB_API const Float2 & operator[](int n) const {
 		return rows[n];
 	}
 
 	/*! Default Constructor */
-	DLLEXPORT Matrix22();
+	NIFLIB_API Matrix22();
 
 	/*! This constructor can be used to set all values in this matrix during initialization
 	 * \param m11 The value to set at row 1, column 1.
@@ -315,7 +315,7 @@ struct Matrix22 {
 	 * \param m21 The value to set at row 2, column 1.
 	 * \param m22 The value to set at row 2, column 2.
 	 */
-	DLLEXPORT Matrix22(
+	NIFLIB_API Matrix22(
 		float m11, float m12,
 		float m21, float m22
 	) {
@@ -329,7 +329,7 @@ struct Matrix22 {
 	 * \param m21 The value to set at row 2, column 1.
 	 * \param m22 The value to set at row 2, column 2.
 	 */
-	DLLEXPORT void Set(
+	NIFLIB_API void Set(
 		float m11, float m12,
 		float m21, float m22
 	) {
@@ -337,10 +337,10 @@ struct Matrix22 {
 		rows[1][0] = m21; rows[1][1] = m22;
 	}
 
-	DLLEXPORT Quaternion AsQuaternion();
+	NIFLIB_API Quaternion AsQuaternion();
 
 	//Python Operator Overloads
-	DLLEXPORT Float2 & __getitem__(int n) {
+	NIFLIB_API Float2 & __getitem__(int n) {
 		if (n > 1 || n < 0)
 			throw std::out_of_range("Index out of range for MatrixRow3");
         return rows[n];
@@ -348,7 +348,7 @@ struct Matrix22 {
 };
 
 /* Stores three floating point numbers.  Used as a row of a Matrix33 and to store the data in attr_vector3 and attr_color3 type attributes. */
-struct DLLEXPORT Float3 {
+struct NIFLIB_API Float3 {
 	float data[3]; /*!< The three floating point numbers stored as an array. */ 
 
 	/*! The bracket operator makes it possible to use this structure like a C++ array.
@@ -411,15 +411,15 @@ struct Matrix33 {
 	 * \param n The index into the row array.  Should be 0, 1, or 2.
 	 * \return The Float3 structure for the given row index by reference so it can be read or set via the bracket operator.
 	 */
-	DLLEXPORT Float3 & operator[](int n) {
+	NIFLIB_API Float3 & operator[](int n) {
 		return rows[n];
 	}
-	DLLEXPORT const Float3 & operator[](int n) const {
+	NIFLIB_API const Float3 & operator[](int n) const {
 		return rows[n];
 	}
 
 	/*! Default constructor.   Initializes matrix to identity.  */
-	DLLEXPORT Matrix33();
+	NIFLIB_API Matrix33();
 
 	/*! This constructor can be used to set all values in this matrix during initialization
 	 * \param m11 The value to set at row 1, column 1.
@@ -432,7 +432,7 @@ struct Matrix33 {
 	 * \param m32 The value to set at row 3, column 2.
 	 * \param m33 The value to set at row 3, column 3.
 	 */
-	DLLEXPORT Matrix33(
+	NIFLIB_API Matrix33(
 		float m11, float m12, float m13,
 		float m21, float m22, float m23,
 		float m31, float m32, float m33
@@ -453,7 +453,7 @@ struct Matrix33 {
 	 * \param m32 The value to set at row 3, column 2.
 	 * \param m33 The value to set at row 3, column 3.
 	 */
-	DLLEXPORT void Set(
+	NIFLIB_API void Set(
 		float m11, float m12, float m13,
 		float m21, float m22, float m23,
 		float m31, float m32, float m33
@@ -466,22 +466,22 @@ struct Matrix33 {
 	/*! Returns a quaternion representation of the rotation stored in this matrix. 
 	 * \return A quaternion with an equivalent rotation to the one stored in this matrix.
 	 */
-	DLLEXPORT Quaternion AsQuaternion();
+	NIFLIB_API Quaternion AsQuaternion();
 
 	/*! Calculates the determinant of this matrix.
 	 * \return The determinant of this matrix.
 	 */
-	DLLEXPORT float Determinant() const;
+	NIFLIB_API float Determinant() const;
 
 	//Undocumented
-	DLLEXPORT void AsFloatArr( float out[3][3] ) {
+	NIFLIB_API void AsFloatArr( float out[3][3] ) {
 		out[0][0] = rows[0][0]; out[0][1] = rows[0][1]; out[0][2] = rows[0][2];
 		out[1][0] = rows[1][0]; out[1][1] = rows[1][1]; out[1][2] = rows[1][2];
 		out[2][0] = rows[2][0]; out[2][1] = rows[2][1]; out[2][2] = rows[2][2];
 	}
 
 	//Python Operator Overloads
-	DLLEXPORT Float3 & __getitem__(int n) {
+	NIFLIB_API Float3 & __getitem__(int n) {
 		if (n > 2 || n < 0)
 			throw std::out_of_range("Index out of range for MatrixRow3");
         return rows[n];
@@ -489,7 +489,7 @@ struct Matrix33 {
 };
 
 /* Stores four floating point numbers.  Used as a row of a Matrix44. */
-struct DLLEXPORT Float4 {
+struct NIFLIB_API Float4 {
 	float data[4]; /*!< The four floating point numbers stored as an array. */ 
 
 	/*! The bracket operator makes it possible to use this structure like a C++ array.
@@ -556,20 +556,20 @@ struct Matrix44 {
 	 * \param n The index into the row array.  Should be 0, 1, 2, or 3.
 	 * \return The Float4 structure for the given row index by reference so it can be read or set via the bracket operator.
 	 */
-	DLLEXPORT Float4 & operator[](int n) {
+	NIFLIB_API Float4 & operator[](int n) {
 		return rows[n];
 	}
-	DLLEXPORT Float4 const & operator[](int n) const {
+	NIFLIB_API Float4 const & operator[](int n) const {
 		return rows[n];
 	}
 
 	/*! Default constructor. Initializes Matrix to Identity. */
-	DLLEXPORT Matrix44();
+	NIFLIB_API Matrix44();
 
 	/*! Copy constructor.  Initializes Matrix to another Matrix44.
 	 * \param The matrix to initialize this one to. 
 	 */
-	DLLEXPORT Matrix44( const Matrix44 & m ) { memcpy(rows, m.rows, sizeof(Float4) * 4); }
+	NIFLIB_API Matrix44( const Matrix44 & m ) { memcpy(rows, m.rows, sizeof(Float4) * 4); }
 
 	/*! This constructor can be used to set all values in this matrix during initialization
 	 * \param m11 The value to set at row 1, column 1.
@@ -589,7 +589,7 @@ struct Matrix44 {
 	 * \param m43 The value to set at row 4, column 3.
 	 * \param m44 The value to set at row 4, column 4.
 	 */
-	DLLEXPORT Matrix44(
+	NIFLIB_API Matrix44(
 		float m11, float m12, float m13, float m14,
 		float m21, float m22, float m23, float m24,
 		float m31, float m32, float m33, float m34,
@@ -607,7 +607,7 @@ struct Matrix44 {
 	 * \param rotate The 3x3 rotation matrix.
 	 * \param scale The scale factor.
 	 */
-	DLLEXPORT Matrix44( const Vector3 & translate, const Matrix33 & rotation, float scale );
+	NIFLIB_API Matrix44( const Vector3 & translate, const Matrix33 & rotation, float scale );
 
 	/*! This function can be used to set all values in this matrix at the same time.
 	 * \param m11 The value to set at row 1, column 1.
@@ -643,94 +643,94 @@ struct Matrix44 {
 	 * \param rh The matrix to multiply this one with.
 	 * \return The result of the multiplication.
 	 */
-	DLLEXPORT Matrix44 operator*( const Matrix44 & rh ) const;
+	NIFLIB_API Matrix44 operator*( const Matrix44 & rh ) const;
 
 	/* Multiplies this matrix by another and sets the result to itself.
 	 * \param rh The matrix to multiply this one with.
 	 * \return This matrix is returned.
 	 */
-	DLLEXPORT Matrix44 & operator*=( const Matrix44 & rh );
+	NIFLIB_API Matrix44 & operator*=( const Matrix44 & rh );
 
 	/* Multiplies this matrix by a scalar value.
 	 * \param rh The scalar value to multiply each component of this matrix by.
 	 * \return The result of the multiplication.
 	 */
-	DLLEXPORT Matrix44 operator*( float rh ) const;
+	NIFLIB_API Matrix44 operator*( float rh ) const;
 
 	/* Multiplies this matrix by a scalar value and sets the resutl to itself.
 	 * \param rh The scalar value to multiply each component of this matrix by.
 	 * \return This matrix is returned.
 	 */
-	DLLEXPORT Matrix44 & operator*=( float rh );
+	NIFLIB_API Matrix44 & operator*=( float rh );
 
 	/* Multiplies this matrix by a vector with x, y, and z components.
 	 * \param rh The vector to multiply this matrix with.
 	 * \return The result of the multiplication.
 	 */
-	DLLEXPORT Vector3 operator*( const Vector3 & rh ) const;
+	NIFLIB_API Vector3 operator*( const Vector3 & rh ) const;
 
 	/* Adds this matrix to another.
 	 * \param rh The matrix to be added to this one.
 	 * \return The result of the addition.
 	 */
-	DLLEXPORT Matrix44 operator+( const Matrix44 & rh ) const;
+	NIFLIB_API Matrix44 operator+( const Matrix44 & rh ) const;
 
 	/* Adds this matrix to another and sets the result to itself.
 	 * \param rh The matrix to be added to this one.
 	 * \return This matrix is returned.
 	 */
-	DLLEXPORT Matrix44 & operator+=( const Matrix44 & rh );
+	NIFLIB_API Matrix44 & operator+=( const Matrix44 & rh );
 
 	/* Sets the values of this matrix to those of the given matrix.
 	 * \param rh The matrix to copy values from.
 	 * \return This matrix is returned.
 	 */
-	DLLEXPORT Matrix44 & operator=( const Matrix44 & rh );
+	NIFLIB_API Matrix44 & operator=( const Matrix44 & rh );
 
 	/* Compares two 4x4 matricies.  They are considered equal if all components are equal.
 	 * \param rh The matrix to compare this one with.
 	 * \return true if the matricies are equal, false otherwise.
 	 */
-	DLLEXPORT bool operator==( const Matrix44 & rh ) const;
+	NIFLIB_API bool operator==( const Matrix44 & rh ) const;
 
 	/* Allows the contents of the matrix to be printed to an ostream.
 	 * \param lh The ostream to insert the text into.
 	 * \param rh The matrix to insert into the stream.
 	 * \return The given ostream is returned.
 	 */
-	DLLEXPORT friend ostream & operator<<( ostream & lh, const Matrix44 & rh );
+	NIFLIB_API friend ostream & operator<<( ostream & lh, const Matrix44 & rh );
 
 	/*! Calculates the transpose of this matrix.
 	 * \return The transpose of this matrix.
 	 */
-	DLLEXPORT Matrix44 Transpose() const;
+	NIFLIB_API Matrix44 Transpose() const;
 
 	/*! Calculates the determinant of this matrix.
 	 * \return The determinant of this matrix.
 	 */
-	DLLEXPORT float Determinant() const;
+	NIFLIB_API float Determinant() const;
 
 	/*! Calculates the inverse of this matrix.
 	 * \retun The inverse of this matrix.
 	 */
-	DLLEXPORT Matrix44 Inverse() const;
+	NIFLIB_API Matrix44 Inverse() const;
 
 	/*! Returns a 3x3 submatrix of this matrix created by skipping the indicated row and column.
 	 * \param skip_r The row to skip.  Must be a value between 0 and 3.
 	 * \param skip_c The colum to skip.  Must be a value between 0 and 3.
 	 * \return The 3x3 submatrix obtained by skipping the indicated row and column.
 	 */
-	DLLEXPORT Matrix33 Submatrix( int skip_r, int skip_c ) const;
+	NIFLIB_API Matrix33 Submatrix( int skip_r, int skip_c ) const;
 
 	/*! Calculates the adjunct of this matrix created by skipping the indicated row and column.
 	 * \param skip_r The row to skip.  Must be a value between 0 and 3.
 	 * \param skip_c The colum to skip.  Must be a value between 0 and 3.
 	 * \return The adjunct obtained by skipping the indicated row and column.
 	 */
-	DLLEXPORT float Adjunct( int skip_r, int skip_c ) const;
+	NIFLIB_API float Adjunct( int skip_r, int skip_c ) const;
 
 	//undocumented
-	DLLEXPORT void AsFloatArr( float out[4][4] ) {
+	NIFLIB_API void AsFloatArr( float out[4][4] ) {
 		out[0][0] = rows[0][0]; out[0][1] = rows[0][1]; out[0][2] = rows[0][2]; out[0][3] = rows[0][3];
 		out[1][0] = rows[1][0]; out[1][1] = rows[1][1]; out[1][2] = rows[1][2]; out[1][3] = rows[1][3];
 		out[2][0] = rows[2][0]; out[2][1] = rows[2][1]; out[2][2] = rows[2][2]; out[2][3] = rows[2][3];
@@ -738,7 +738,7 @@ struct Matrix44 {
 	}
 
 	//Python Operator Overloads
-	DLLEXPORT Float4 & __getitem__(int n) {
+	NIFLIB_API Float4 & __getitem__(int n) {
 		if (n > 3 || n < 0)
 			throw std::out_of_range("Index out of range for Matrix44");
         return rows[n];
@@ -746,7 +746,7 @@ struct Matrix44 {
 };
 
 /*! Stores a color along with alpha translucency */
-struct DLLEXPORT Color4 {
+struct NIFLIB_API Color4 {
 	float r; /*!< The red component of this color.  Should be between 0.0f and 1.0f. */ 
 	float g; /*!< The green component of this color.  Should be between 0.0f and 1.0f. */ 
 	float b; /*!< The blue component of this color.  Should be between 0.0f and 1.0f. */ 
@@ -783,7 +783,7 @@ struct DLLEXPORT Color4 {
 };
 
 /*! Represents a quaternion - a 4D extention of complex numbers used as an alternitive to matrices to represent rotation.*/
-struct DLLEXPORT Quaternion {
+struct NIFLIB_API Quaternion {
 	float w; /*!< The W scalar component of this Quaternion. */ 
 	float x; /*!< The X vector component of this Quaternion. */ 
 	float y; /*!< The Y vector component of this Quaternion. */ 
diff --git a/niflib.cpp b/niflib.cpp
index c457f8ef..6a66e7f1 100644
--- a/niflib.cpp
+++ b/niflib.cpp
@@ -2,6 +2,8 @@
 All rights reserved.  Please see niflib.h for licence. */
 
 //#define DEBUG // this will produce lots of output
+//#define PRINT_BLOCK_NAMES
+//#define PRINT_BLOCK_CONTENTS
 
 #include "niflib.h"
 #include "obj/NiAVObject.h"
@@ -277,7 +279,9 @@ vector<NiObjectRef> ReadNifList( istream & in ) {
 			}
 		}
 
-		//cout << endl << i << ":  " << blockName;
+#ifdef PRINT_BLOCK_NAMES
+		cout << endl << i << ":  " << blockName;
+#endif
 
 		//Create Block of the type that was found
 		blocks[i] = CreateBlock(blockName);
@@ -297,8 +301,9 @@ vector<NiObjectRef> ReadNifList( istream & in ) {
 
 		//blocks[i]->SetBlockNum(i);
 		blocks[i]->Read( in, link_stack, version, user_version );
-
-		//cout << endl << blocks[i]->asString() << endl;
+#ifdef PRINT_BLOCK_CONTENTS
+		cout << endl << blocks[i]->asString() << endl;
+#endif
 	}
 
 	//cout << endl;
diff --git a/niflib.h b/niflib.h
index 2a313a35..142d69f9 100644
--- a/niflib.h
+++ b/niflib.h
@@ -91,7 +91,7 @@ using namespace std;
  *      print blocks[0]
  * \endcode
  */
-DLLEXPORT unsigned int CheckNifHeader( string const & file_name );
+NIFLIB_API unsigned int CheckNifHeader( string const & file_name );
 
 /*!
  * Reads the given file by file name and returns a vector of block references
@@ -110,14 +110,14 @@ DLLEXPORT unsigned int CheckNifHeader( string const & file_name );
  * 
  * \sa ReadNifTree, WriteNifTree
  */
-DLLEXPORT vector<NiObjectRef> ReadNifList( string const & file_name );
+NIFLIB_API vector<NiObjectRef> ReadNifList( string const & file_name );
 
 /*!
  * Reads the given input stream and returns a vector of block references
  * \param stream The input stream to read NIF data from.
  * \return A vector of block references that point to all the blocks read from the stream.
  */
-DLLEXPORT vector<NiObjectRef> ReadNifList( istream & in );
+NIFLIB_API vector<NiObjectRef> ReadNifList( istream & in );
 
 /*!
  * Reads the given file by file name and returns a reference to the root block.
@@ -136,14 +136,14 @@ DLLEXPORT vector<NiObjectRef> ReadNifList( istream & in );
  * 
  * \sa ReadNifList, WriteNifTree
  */
-DLLEXPORT NiObjectRef ReadNifTree( string const & file_name );
+NIFLIB_API NiObjectRef ReadNifTree( string const & file_name );
 
 /*!
  * Reads the given input stream and returns a reference to the root block.
  * \param stream The input stream to read NIF data from.
  * \return A block reference that points to the root of the tree of data blocks contained in the NIF file.
  */
-DLLEXPORT NiObjectRef ReadNifTree( istream & in );
+NIFLIB_API NiObjectRef ReadNifTree( istream & in );
 
 /*!
  * Creates a new NIF file of the given file name by crawling through the data tree starting with the root block given.
@@ -166,7 +166,7 @@ DLLEXPORT NiObjectRef ReadNifTree( istream & in );
  * 
  * \sa ReadNifList, WriteNifTree
  */
-DLLEXPORT void WriteNifTree( string const & file_name, NiObjectRef const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 );
+NIFLIB_API void WriteNifTree( string const & file_name, NiObjectRef const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 );
 
 /*!
  * Writes a nif tree to an ostream starting at the given root block.
@@ -174,7 +174,7 @@ DLLEXPORT void WriteNifTree( string const & file_name, NiObjectRef const & root,
  * \param root The root block to start from when writing out the NIF data.  All decedents of this block will be written to the stream in tree-descending order.
  * \param version The version of the NIF format to use when writing a file.  Default is version 4.0.0.2.
  */
-DLLEXPORT void WriteNifTree( ostream & stream, NiObjectRef const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 );
+NIFLIB_API void WriteNifTree( ostream & stream, NiObjectRef const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 );
 
 /*!
  * Writes a bunch of files given a base file name, and a pointer to the root block of the Nif file tree.
@@ -184,7 +184,7 @@ DLLEXPORT void WriteNifTree( ostream & stream, NiObjectRef const & root, unsigne
  * \param export_files What files to write: NIF, NIF + KF + KFM, NIF + KF's + KFM, KF only, KF's only
  * \param kf_type The KF type (Morrowind style, DAoC style, CivIV style, ...)
  */
-DLLEXPORT void WriteFileGroup( string const & file_name, NiObjectRef const & root, unsigned int version, unsigned int export_files, unsigned int kf_type );
+NIFLIB_API void WriteFileGroup( string const & file_name, NiObjectRef const & root, unsigned int version, unsigned int export_files, unsigned int kf_type );
 
 /*!
  * Merges two Nif trees into one.  For standard Nif files, any blocks with the same name are merged.  For Kf files, blocks are attatched to those that match the name specified in the KF root block.  The data stored in a NIF file varies from version to version.  Usually you are safe with the default option (the highest availiable version) but you may need to use an earlier version if you need to clone an obsolete piece of information.
@@ -192,7 +192,7 @@ DLLEXPORT void WriteFileGroup( string const & file_name, NiObjectRef const & roo
  * \param right The root block of the second Nif tree to merge.
  * \param version The version of the nif format to use during the clone operation on the right-hand tree.  The default is the highest version availiable.
  */
-DLLEXPORT void MergeNifTrees( NiObjectRef target, NiObjectRef right, unsigned int version = 0xFFFFFFFF );
+NIFLIB_API void MergeNifTrees( NiObjectRef target, NiObjectRef right, unsigned int version = 0xFFFFFFFF );
 
 
 //// Returns list of all blocks in the tree rooted by root block.
@@ -218,7 +218,7 @@ DLLEXPORT void MergeNifTrees( NiObjectRef target, NiObjectRef right, unsigned in
  * 
  * sa BlocksInMemory
  */
-DLLEXPORT NiObjectRef CreateBlock( string block_type );
+NIFLIB_API NiObjectRef CreateBlock( string block_type );
 
 
 
diff --git a/niflib.sln b/niflib.sln
index a7f5f1ba..b44f9201 100644
--- a/niflib.sln
+++ b/niflib.sln
@@ -8,6 +8,7 @@ Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
 		PyNiflib|Win32 = PyNiflib|Win32
+		Release - DLL|Win32 = Release - DLL|Win32
 		Release|Win32 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -15,12 +16,15 @@ Global
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug|Win32.Build.0 = Debug|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.PyNiflib|Win32.ActiveCfg = PyNiflib|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.PyNiflib|Win32.Build.0 = PyNiflib|Win32
+		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.ActiveCfg = Release - DLL|Win32
+		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.Build.0 = Release - DLL|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.ActiveCfg = Release|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.Build.0 = Release|Win32
 		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Debug|Win32.ActiveCfg = Debug|Win32
 		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Debug|Win32.Build.0 = Debug|Win32
 		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.PyNiflib|Win32.ActiveCfg = PyNiflib|Win32
 		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.PyNiflib|Win32.Build.0 = PyNiflib|Win32
+		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Release - DLL|Win32.ActiveCfg = Release - DLL|Win32
 		{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Release|Win32.ActiveCfg = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
diff --git a/niflib.vcproj b/niflib.vcproj
index 94f59012..6aa18a8e 100644
--- a/niflib.vcproj
+++ b/niflib.vcproj
@@ -82,7 +82,7 @@
 			Name="Release|Win32"
 			OutputDirectory="..\Release"
 			IntermediateDirectory="..\Release"
-			ConfigurationType="2"
+			ConfigurationType="4"
 			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 			CharacterSet="2"
 			WholeProgramOptimization="1"
@@ -106,7 +106,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/FI&quot;pch.h&quot;"
 				Optimization="3"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BUILDING_DLL"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="0"
 				UsePrecompiledHeader="2"
 				PrecompiledHeaderThrough="pch.h"
@@ -124,15 +124,12 @@
 				Name="VCPreLinkEventTool"
 			/>
 			<Tool
-				Name="VCLinkerTool"
-				OutputFile="..\bin\niflib.dll"
+				Name="VCLibrarianTool"
+				OutputFile="../bin/niflib.lib"
 			/>
 			<Tool
 				Name="VCALinkTool"
 			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
 			<Tool
 				Name="VCXDCMakeTool"
 			/>
@@ -142,12 +139,6 @@
 			<Tool
 				Name="VCFxCopTool"
 			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
 			<Tool
 				Name="VCPostBuildEventTool"
 			/>
@@ -212,6 +203,80 @@
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
+		<Configuration
+			Name="Release - DLL|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/FI&quot;pch.h&quot;"
+				Optimization="3"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BUILDING_NIFLIB_DLL;USE_NIFLIB_DLL"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="pch.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="..\bin\niflib.dll"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
 	</Configurations>
 	<References>
 	</References>
@@ -252,6 +317,14 @@
 						UsePrecompiledHeader="1"
 					/>
 				</FileConfiguration>
+				<FileConfiguration
+					Name="Release - DLL|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
 			</File>
 			<File
 				RelativePath=".\Type.cpp"
diff --git a/obj/ABoneLODController.h b/obj/ABoneLODController.h
index 8d82ef84..adecaad0 100644
--- a/obj/ABoneLODController.h
+++ b/obj/ABoneLODController.h
@@ -17,7 +17,7 @@ typedef Ref<ABoneLODController> ABoneLODControllerRef;
  * ABoneLODController - Level of detail controller for bones?
  */
 
-class DLLEXPORT ABoneLODController : public A_BONE_L_O_D_CONTROLLER_PARENT {
+class NIFLIB_API ABoneLODController : public A_BONE_L_O_D_CONTROLLER_PARENT {
 public:
 	ABoneLODController();
 	~ABoneLODController();
diff --git a/obj/AKeyedData.h b/obj/AKeyedData.h
index 6260c94b..0f935fcf 100644
--- a/obj/AKeyedData.h
+++ b/obj/AKeyedData.h
@@ -15,7 +15,7 @@ typedef Ref<AKeyedData> AKeyedDataRef;
  * AKeyedData - Single items of data linked to particular key times.
  */
 
-class DLLEXPORT AKeyedData : public A_KEYED_DATA_PARENT {
+class NIFLIB_API AKeyedData : public A_KEYED_DATA_PARENT {
 public:
 	AKeyedData();
 	~AKeyedData();
diff --git a/obj/APSysCtlr.h b/obj/APSysCtlr.h
index e9dab094..1aebf1d9 100644
--- a/obj/APSysCtlr.h
+++ b/obj/APSysCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<APSysCtlr> APSysCtlrRef;
  * APSysCtlr - Unknown.
  */
 
-class DLLEXPORT APSysCtlr : public A_P_SYS_CTLR_PARENT {
+class NIFLIB_API APSysCtlr : public A_P_SYS_CTLR_PARENT {
 public:
 	APSysCtlr();
 	~APSysCtlr();
diff --git a/obj/APSysData.h b/obj/APSysData.h
index cdd5bb93..e1c6841b 100644
--- a/obj/APSysData.h
+++ b/obj/APSysData.h
@@ -15,7 +15,7 @@ typedef Ref<APSysData> APSysDataRef;
  * APSysData - Particle system data.  Probably really NiPSysData.
  */
 
-class DLLEXPORT APSysData : public A_P_SYS_DATA_PARENT {
+class NIFLIB_API APSysData : public A_P_SYS_DATA_PARENT {
 public:
 	APSysData();
 	~APSysData();
diff --git a/obj/AParticleModifier.h b/obj/AParticleModifier.h
index b3a44559..3eded411 100644
--- a/obj/AParticleModifier.h
+++ b/obj/AParticleModifier.h
@@ -19,7 +19,7 @@ typedef Ref<AParticleModifier> AParticleModifierRef;
  * AParticleModifier - A particle system modifier.
  */
 
-class DLLEXPORT AParticleModifier : public A_PARTICLE_MODIFIER_PARENT {
+class NIFLIB_API AParticleModifier : public A_PARTICLE_MODIFIER_PARENT {
 public:
 	AParticleModifier();
 	~AParticleModifier();
diff --git a/obj/AbhkConstraint.h b/obj/AbhkConstraint.h
index 7b9cc5ed..8136bc16 100644
--- a/obj/AbhkConstraint.h
+++ b/obj/AbhkConstraint.h
@@ -19,7 +19,7 @@ typedef Ref<AbhkConstraint> AbhkConstraintRef;
  * AbhkConstraint - Describes a physical constraint.
  */
 
-class DLLEXPORT AbhkConstraint : public ABHK_CONSTRAINT_PARENT {
+class NIFLIB_API AbhkConstraint : public ABHK_CONSTRAINT_PARENT {
 public:
 	AbhkConstraint();
 	~AbhkConstraint();
diff --git a/obj/AbhkRagdollConstraint.h b/obj/AbhkRagdollConstraint.h
index 3887ec8a..ae745560 100644
--- a/obj/AbhkRagdollConstraint.h
+++ b/obj/AbhkRagdollConstraint.h
@@ -15,7 +15,7 @@ typedef Ref<AbhkRagdollConstraint> AbhkRagdollConstraintRef;
  * AbhkRagdollConstraint - Ragdoll constraint.
  */
 
-class DLLEXPORT AbhkRagdollConstraint : public ABHK_RAGDOLL_CONSTRAINT_PARENT {
+class NIFLIB_API AbhkRagdollConstraint : public ABHK_RAGDOLL_CONSTRAINT_PARENT {
 public:
 	AbhkRagdollConstraint();
 	~AbhkRagdollConstraint();
diff --git a/obj/AbhkShapeCollection.h b/obj/AbhkShapeCollection.h
index e61cfdde..aec02dfa 100644
--- a/obj/AbhkShapeCollection.h
+++ b/obj/AbhkShapeCollection.h
@@ -16,7 +16,7 @@ typedef Ref<AbhkShapeCollection> AbhkShapeCollectionRef;
  * hierarchy.
  */
 
-class DLLEXPORT AbhkShapeCollection : public ABHK_SHAPE_COLLECTION_PARENT {
+class NIFLIB_API AbhkShapeCollection : public ABHK_SHAPE_COLLECTION_PARENT {
 public:
 	AbhkShapeCollection();
 	~AbhkShapeCollection();
diff --git a/obj/AvoidNode.h b/obj/AvoidNode.h
index 0656d359..81dae7af 100644
--- a/obj/AvoidNode.h
+++ b/obj/AvoidNode.h
@@ -15,7 +15,7 @@ typedef Ref<AvoidNode> AvoidNodeRef;
  * AvoidNode - Morrowind specific?
  */
 
-class DLLEXPORT AvoidNode : public AVOID_NODE_PARENT {
+class NIFLIB_API AvoidNode : public AVOID_NODE_PARENT {
 public:
 	AvoidNode();
 	~AvoidNode();
diff --git a/obj/BSBound.h b/obj/BSBound.h
index 56358d27..54eba7ea 100644
--- a/obj/BSBound.h
+++ b/obj/BSBound.h
@@ -15,7 +15,7 @@ typedef Ref<BSBound> BSBoundRef;
  * BSBound - Unknown.
  */
 
-class DLLEXPORT BSBound : public B_S_BOUND_PARENT {
+class NIFLIB_API BSBound : public B_S_BOUND_PARENT {
 public:
 	BSBound();
 	~BSBound();
diff --git a/obj/BSFurnitureMarker.h b/obj/BSFurnitureMarker.h
index 9a20e7e3..4f57228a 100644
--- a/obj/BSFurnitureMarker.h
+++ b/obj/BSFurnitureMarker.h
@@ -17,7 +17,7 @@ typedef Ref<BSFurnitureMarker> BSFurnitureMarkerRef;
  * BSFurnitureMarker - Unknown. Marks furniture sitting positions?
  */
 
-class DLLEXPORT BSFurnitureMarker : public B_S_FURNITURE_MARKER_PARENT {
+class NIFLIB_API BSFurnitureMarker : public B_S_FURNITURE_MARKER_PARENT {
 public:
 	BSFurnitureMarker();
 	~BSFurnitureMarker();
diff --git a/obj/BSKeyframeController.h b/obj/BSKeyframeController.h
index 245fdf2d..3bbf1f8a 100644
--- a/obj/BSKeyframeController.h
+++ b/obj/BSKeyframeController.h
@@ -19,7 +19,7 @@ typedef Ref<BSKeyframeController> BSKeyframeControllerRef;
  * BSKeyframeController - An extended keyframe controller.
  */
 
-class DLLEXPORT BSKeyframeController : public B_S_KEYFRAME_CONTROLLER_PARENT {
+class NIFLIB_API BSKeyframeController : public B_S_KEYFRAME_CONTROLLER_PARENT {
 public:
 	BSKeyframeController();
 	~BSKeyframeController();
diff --git a/obj/BSPSysArrayEmitter.h b/obj/BSPSysArrayEmitter.h
index 2c312574..4d1ef9f8 100644
--- a/obj/BSPSysArrayEmitter.h
+++ b/obj/BSPSysArrayEmitter.h
@@ -15,7 +15,7 @@ typedef Ref<BSPSysArrayEmitter> BSPSysArrayEmitterRef;
  * BSPSysArrayEmitter - Unknown.
  */
 
-class DLLEXPORT BSPSysArrayEmitter : public B_S_P_SYS_ARRAY_EMITTER_PARENT {
+class NIFLIB_API BSPSysArrayEmitter : public B_S_P_SYS_ARRAY_EMITTER_PARENT {
 public:
 	BSPSysArrayEmitter();
 	~BSPSysArrayEmitter();
diff --git a/obj/BSParentVelocityModifier.h b/obj/BSParentVelocityModifier.h
index 624b315d..3a9e77d9 100644
--- a/obj/BSParentVelocityModifier.h
+++ b/obj/BSParentVelocityModifier.h
@@ -15,7 +15,7 @@ typedef Ref<BSParentVelocityModifier> BSParentVelocityModifierRef;
  * BSParentVelocityModifier - Unknown.
  */
 
-class DLLEXPORT BSParentVelocityModifier : public B_S_PARENT_VELOCITY_MODIFIER_PARENT {
+class NIFLIB_API BSParentVelocityModifier : public B_S_PARENT_VELOCITY_MODIFIER_PARENT {
 public:
 	BSParentVelocityModifier();
 	~BSParentVelocityModifier();
diff --git a/obj/BSXFlags.h b/obj/BSXFlags.h
index ce390772..908ca274 100644
--- a/obj/BSXFlags.h
+++ b/obj/BSXFlags.h
@@ -15,7 +15,7 @@ typedef Ref<BSXFlags> BSXFlagsRef;
  * BSXFlags - Unknown.
  */
 
-class DLLEXPORT BSXFlags : public B_S_X_FLAGS_PARENT {
+class NIFLIB_API BSXFlags : public B_S_X_FLAGS_PARENT {
 public:
 	BSXFlags();
 	~BSXFlags();
diff --git a/obj/FxButton.h b/obj/FxButton.h
index f52295af..5767338b 100644
--- a/obj/FxButton.h
+++ b/obj/FxButton.h
@@ -15,7 +15,7 @@ typedef Ref<FxButton> FxButtonRef;
  * FxButton - Unknown.
  */
 
-class DLLEXPORT FxButton : public FX_BUTTON_PARENT {
+class NIFLIB_API FxButton : public FX_BUTTON_PARENT {
 public:
 	FxButton();
 	~FxButton();
diff --git a/obj/FxRadioButton.h b/obj/FxRadioButton.h
index 1870ae49..88340f74 100644
--- a/obj/FxRadioButton.h
+++ b/obj/FxRadioButton.h
@@ -19,7 +19,7 @@ typedef Ref<FxRadioButton> FxRadioButtonRef;
  * FxRadioButton - Unknown.
  */
 
-class DLLEXPORT FxRadioButton : public FX_RADIO_BUTTON_PARENT {
+class NIFLIB_API FxRadioButton : public FX_RADIO_BUTTON_PARENT {
 public:
 	FxRadioButton();
 	~FxRadioButton();
diff --git a/obj/FxWidget.h b/obj/FxWidget.h
index e199a45b..d5b3d848 100644
--- a/obj/FxWidget.h
+++ b/obj/FxWidget.h
@@ -15,7 +15,7 @@ typedef Ref<FxWidget> FxWidgetRef;
  * FxWidget - Firaxis-specific UI widgets?
  */
 
-class DLLEXPORT FxWidget : public FX_WIDGET_PARENT {
+class NIFLIB_API FxWidget : public FX_WIDGET_PARENT {
 public:
 	FxWidget();
 	~FxWidget();
diff --git a/obj/NiAVObject.h b/obj/NiAVObject.h
index 094fc4fa..1c2dd620 100644
--- a/obj/NiAVObject.h
+++ b/obj/NiAVObject.h
@@ -23,7 +23,7 @@ class NiNode;
 class NiAVObject;
 typedef Ref<NiAVObject> NiAVObjectRef;
 
-class DLLEXPORT NiAVObject : public NI_A_V_OBJECT_PARENT {
+class NIFLIB_API NiAVObject : public NI_A_V_OBJECT_PARENT {
 public:
 	NiAVObject();
 	~NiAVObject();
diff --git a/obj/NiAlphaController.h b/obj/NiAlphaController.h
index 710ead8d..e9ef63af 100644
--- a/obj/NiAlphaController.h
+++ b/obj/NiAlphaController.h
@@ -19,7 +19,7 @@ typedef Ref<NiAlphaController> NiAlphaControllerRef;
  * NiAlphaController - Time controller for transparency.
  */
 
-class DLLEXPORT NiAlphaController : public NI_ALPHA_CONTROLLER_PARENT {
+class NIFLIB_API NiAlphaController : public NI_ALPHA_CONTROLLER_PARENT {
 public:
 	NiAlphaController();
 	~NiAlphaController();
diff --git a/obj/NiAlphaProperty.h b/obj/NiAlphaProperty.h
index ec5afac8..dbbab41c 100644
--- a/obj/NiAlphaProperty.h
+++ b/obj/NiAlphaProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiAlphaProperty> NiAlphaPropertyRef;
  * NiAlphaProperty - Transparency. Flags 0x00ED.
  */
 
-class DLLEXPORT NiAlphaProperty : public NI_ALPHA_PROPERTY_PARENT {
+class NIFLIB_API NiAlphaProperty : public NI_ALPHA_PROPERTY_PARENT {
 public:
 	NiAlphaProperty();
 	~NiAlphaProperty();
diff --git a/obj/NiAmbientLight.h b/obj/NiAmbientLight.h
index 8aa44b40..46b7f796 100644
--- a/obj/NiAmbientLight.h
+++ b/obj/NiAmbientLight.h
@@ -15,7 +15,7 @@ typedef Ref<NiAmbientLight> NiAmbientLightRef;
  * NiAmbientLight - Ambient light source.
  */
 
-class DLLEXPORT NiAmbientLight : public NI_AMBIENT_LIGHT_PARENT {
+class NIFLIB_API NiAmbientLight : public NI_AMBIENT_LIGHT_PARENT {
 public:
 	NiAmbientLight();
 	~NiAmbientLight();
diff --git a/obj/NiAutoNormalParticles.h b/obj/NiAutoNormalParticles.h
index 41267528..68f1cea8 100644
--- a/obj/NiAutoNormalParticles.h
+++ b/obj/NiAutoNormalParticles.h
@@ -15,7 +15,7 @@ typedef Ref<NiAutoNormalParticles> NiAutoNormalParticlesRef;
  * NiAutoNormalParticles - Unknown.
  */
 
-class DLLEXPORT NiAutoNormalParticles : public NI_AUTO_NORMAL_PARTICLES_PARENT {
+class NIFLIB_API NiAutoNormalParticles : public NI_AUTO_NORMAL_PARTICLES_PARENT {
 public:
 	NiAutoNormalParticles();
 	~NiAutoNormalParticles();
diff --git a/obj/NiAutoNormalParticlesData.h b/obj/NiAutoNormalParticlesData.h
index e9059509..274b6a93 100644
--- a/obj/NiAutoNormalParticlesData.h
+++ b/obj/NiAutoNormalParticlesData.h
@@ -16,7 +16,7 @@ typedef Ref<NiAutoNormalParticlesData> NiAutoNormalParticlesDataRef;
  * normals?).
  */
 
-class DLLEXPORT NiAutoNormalParticlesData : public NI_AUTO_NORMAL_PARTICLES_DATA_PARENT {
+class NIFLIB_API NiAutoNormalParticlesData : public NI_AUTO_NORMAL_PARTICLES_DATA_PARENT {
 public:
 	NiAutoNormalParticlesData();
 	~NiAutoNormalParticlesData();
diff --git a/obj/NiBSAnimationNode.h b/obj/NiBSAnimationNode.h
index 2abc3fa6..46b88bf0 100644
--- a/obj/NiBSAnimationNode.h
+++ b/obj/NiBSAnimationNode.h
@@ -16,7 +16,7 @@ typedef Ref<NiBSAnimationNode> NiBSAnimationNodeRef;
  * properties stored in the flags.
  */
 
-class DLLEXPORT NiBSAnimationNode : public NI_B_S_ANIMATION_NODE_PARENT {
+class NIFLIB_API NiBSAnimationNode : public NI_B_S_ANIMATION_NODE_PARENT {
 public:
 	NiBSAnimationNode();
 	~NiBSAnimationNode();
diff --git a/obj/NiBSBoneLODController.h b/obj/NiBSBoneLODController.h
index 4b2457ed..f1d3ed5a 100644
--- a/obj/NiBSBoneLODController.h
+++ b/obj/NiBSBoneLODController.h
@@ -15,7 +15,7 @@ typedef Ref<NiBSBoneLODController> NiBSBoneLODControllerRef;
  * NiBSBoneLODController - A simple LOD controller for bones.
  */
 
-class DLLEXPORT NiBSBoneLODController : public NI_B_S_BONE_L_O_D_CONTROLLER_PARENT {
+class NIFLIB_API NiBSBoneLODController : public NI_B_S_BONE_L_O_D_CONTROLLER_PARENT {
 public:
 	NiBSBoneLODController();
 	~NiBSBoneLODController();
diff --git a/obj/NiBSPArrayController.h b/obj/NiBSPArrayController.h
index 06551f46..58347907 100644
--- a/obj/NiBSPArrayController.h
+++ b/obj/NiBSPArrayController.h
@@ -16,7 +16,7 @@ typedef Ref<NiBSPArrayController> NiBSPArrayControllerRef;
  * conjunction with NiBSParticleNode.
  */
 
-class DLLEXPORT NiBSPArrayController : public NI_B_S_P_ARRAY_CONTROLLER_PARENT {
+class NIFLIB_API NiBSPArrayController : public NI_B_S_P_ARRAY_CONTROLLER_PARENT {
 public:
 	NiBSPArrayController();
 	~NiBSPArrayController();
diff --git a/obj/NiBSParticleNode.h b/obj/NiBSParticleNode.h
index 431c88af..a961d1a9 100644
--- a/obj/NiBSParticleNode.h
+++ b/obj/NiBSParticleNode.h
@@ -15,7 +15,7 @@ typedef Ref<NiBSParticleNode> NiBSParticleNodeRef;
  * NiBSParticleNode - Unknown.
  */
 
-class DLLEXPORT NiBSParticleNode : public NI_B_S_PARTICLE_NODE_PARENT {
+class NIFLIB_API NiBSParticleNode : public NI_B_S_PARTICLE_NODE_PARENT {
 public:
 	NiBSParticleNode();
 	~NiBSParticleNode();
diff --git a/obj/NiBSplineBasisData.h b/obj/NiBSplineBasisData.h
index 71492e79..975ff672 100644
--- a/obj/NiBSplineBasisData.h
+++ b/obj/NiBSplineBasisData.h
@@ -15,7 +15,7 @@ typedef Ref<NiBSplineBasisData> NiBSplineBasisDataRef;
  * NiBSplineBasisData - Unknown.
  */
 
-class DLLEXPORT NiBSplineBasisData : public NI_B_SPLINE_BASIS_DATA_PARENT {
+class NIFLIB_API NiBSplineBasisData : public NI_B_SPLINE_BASIS_DATA_PARENT {
 public:
 	NiBSplineBasisData();
 	~NiBSplineBasisData();
diff --git a/obj/NiBSplineCompFloatInterpolator.h b/obj/NiBSplineCompFloatInterpolator.h
index 06c0d56d..0a05d260 100644
--- a/obj/NiBSplineCompFloatInterpolator.h
+++ b/obj/NiBSplineCompFloatInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBSplineCompFloatInterpolator> NiBSplineCompFloatInterpolatorRef;
  * NiBSplineCompFloatInterpolator - Unknown.
  */
 
-class DLLEXPORT NiBSplineCompFloatInterpolator : public NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBSplineCompFloatInterpolator : public NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT {
 public:
 	NiBSplineCompFloatInterpolator();
 	~NiBSplineCompFloatInterpolator();
diff --git a/obj/NiBSplineCompPoint3Interpolator.h b/obj/NiBSplineCompPoint3Interpolator.h
index 7065f259..e1dc4101 100644
--- a/obj/NiBSplineCompPoint3Interpolator.h
+++ b/obj/NiBSplineCompPoint3Interpolator.h
@@ -20,7 +20,7 @@ typedef Ref<NiBSplineCompPoint3Interpolator> NiBSplineCompPoint3InterpolatorRef;
  * NiBSplineCompPoint3Interpolator - Unknown.
  */
 
-class DLLEXPORT NiBSplineCompPoint3Interpolator : public NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBSplineCompPoint3Interpolator : public NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT {
 public:
 	NiBSplineCompPoint3Interpolator();
 	~NiBSplineCompPoint3Interpolator();
diff --git a/obj/NiBSplineCompTransformInterpolator.h b/obj/NiBSplineCompTransformInterpolator.h
index cce870b2..25dc9ac3 100644
--- a/obj/NiBSplineCompTransformInterpolator.h
+++ b/obj/NiBSplineCompTransformInterpolator.h
@@ -20,7 +20,7 @@ typedef Ref<NiBSplineCompTransformInterpolator> NiBSplineCompTransformInterpolat
  * NiBSplineCompTransformInterpolator - Unknown.
  */
 
-class DLLEXPORT NiBSplineCompTransformInterpolator : public NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBSplineCompTransformInterpolator : public NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT {
 public:
 	NiBSplineCompTransformInterpolator();
 	~NiBSplineCompTransformInterpolator();
diff --git a/obj/NiBSplineInterpolator.h b/obj/NiBSplineInterpolator.h
index 3203bc3b..1b675b59 100644
--- a/obj/NiBSplineInterpolator.h
+++ b/obj/NiBSplineInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBSplineInterpolator> NiBSplineInterpolatorRef;
  * NiBSplineInterpolator - A B-spline (component?) interpolator.
  */
 
-class DLLEXPORT NiBSplineInterpolator : public NI_B_SPLINE_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBSplineInterpolator : public NI_B_SPLINE_INTERPOLATOR_PARENT {
 public:
 	NiBSplineInterpolator();
 	~NiBSplineInterpolator();
diff --git a/obj/NiBillboardNode.h b/obj/NiBillboardNode.h
index 2fda1ebc..ac5bc6ae 100644
--- a/obj/NiBillboardNode.h
+++ b/obj/NiBillboardNode.h
@@ -16,7 +16,7 @@ typedef Ref<NiBillboardNode> NiBillboardNodeRef;
  * camera creating a billboard effect for any attached objects.
  */
 
-class DLLEXPORT NiBillboardNode : public NI_BILLBOARD_NODE_PARENT {
+class NIFLIB_API NiBillboardNode : public NI_BILLBOARD_NODE_PARENT {
 public:
 	NiBillboardNode();
 	~NiBillboardNode();
diff --git a/obj/NiBinaryExtraData.h b/obj/NiBinaryExtraData.h
index 6409d9a8..1151e04d 100644
--- a/obj/NiBinaryExtraData.h
+++ b/obj/NiBinaryExtraData.h
@@ -18,7 +18,7 @@ typedef Ref<NiBinaryExtraData> NiBinaryExtraDataRef;
  * binormals in Oblivion.
  */
 
-class DLLEXPORT NiBinaryExtraData : public NI_BINARY_EXTRA_DATA_PARENT {
+class NIFLIB_API NiBinaryExtraData : public NI_BINARY_EXTRA_DATA_PARENT {
 public:
 	NiBinaryExtraData();
 	~NiBinaryExtraData();
diff --git a/obj/NiBlendBoolInterpolator.h b/obj/NiBlendBoolInterpolator.h
index 501216c5..6906a1b3 100644
--- a/obj/NiBlendBoolInterpolator.h
+++ b/obj/NiBlendBoolInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBlendBoolInterpolator> NiBlendBoolInterpolatorRef;
  * NiBlendBoolInterpolator - An interpolator for a bool.
  */
 
-class DLLEXPORT NiBlendBoolInterpolator : public NI_BLEND_BOOL_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBlendBoolInterpolator : public NI_BLEND_BOOL_INTERPOLATOR_PARENT {
 public:
 	NiBlendBoolInterpolator();
 	~NiBlendBoolInterpolator();
diff --git a/obj/NiBlendFloatInterpolator.h b/obj/NiBlendFloatInterpolator.h
index fe888e11..eacf9385 100644
--- a/obj/NiBlendFloatInterpolator.h
+++ b/obj/NiBlendFloatInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBlendFloatInterpolator> NiBlendFloatInterpolatorRef;
  * NiBlendFloatInterpolator - An interpolator for a float.
  */
 
-class DLLEXPORT NiBlendFloatInterpolator : public NI_BLEND_FLOAT_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBlendFloatInterpolator : public NI_BLEND_FLOAT_INTERPOLATOR_PARENT {
 public:
 	NiBlendFloatInterpolator();
 	~NiBlendFloatInterpolator();
diff --git a/obj/NiBlendInterpolator.h b/obj/NiBlendInterpolator.h
index c879585f..80838838 100644
--- a/obj/NiBlendInterpolator.h
+++ b/obj/NiBlendInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBlendInterpolator> NiBlendInterpolatorRef;
  * NiBlendInterpolator - An extended type of interpolater.
  */
 
-class DLLEXPORT NiBlendInterpolator : public NI_BLEND_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBlendInterpolator : public NI_BLEND_INTERPOLATOR_PARENT {
 public:
 	NiBlendInterpolator();
 	~NiBlendInterpolator();
diff --git a/obj/NiBlendPoint3Interpolator.h b/obj/NiBlendPoint3Interpolator.h
index 6f20e256..4d5b1440 100644
--- a/obj/NiBlendPoint3Interpolator.h
+++ b/obj/NiBlendPoint3Interpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBlendPoint3Interpolator> NiBlendPoint3InterpolatorRef;
  * NiBlendPoint3Interpolator - Interpolates a point?
  */
 
-class DLLEXPORT NiBlendPoint3Interpolator : public NI_BLEND_POINT3_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBlendPoint3Interpolator : public NI_BLEND_POINT3_INTERPOLATOR_PARENT {
 public:
 	NiBlendPoint3Interpolator();
 	~NiBlendPoint3Interpolator();
diff --git a/obj/NiBlendTransformInterpolator.h b/obj/NiBlendTransformInterpolator.h
index f3d6600c..b3dc6bbf 100644
--- a/obj/NiBlendTransformInterpolator.h
+++ b/obj/NiBlendTransformInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiBlendTransformInterpolator> NiBlendTransformInterpolatorRef;
  * NiBlendTransformInterpolator - Unknown.
  */
 
-class DLLEXPORT NiBlendTransformInterpolator : public NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBlendTransformInterpolator : public NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT {
 public:
 	NiBlendTransformInterpolator();
 	~NiBlendTransformInterpolator();
diff --git a/obj/NiBoneLODController.h b/obj/NiBoneLODController.h
index a27ab952..574febee 100644
--- a/obj/NiBoneLODController.h
+++ b/obj/NiBoneLODController.h
@@ -21,7 +21,7 @@ typedef Ref<NiBoneLODController> NiBoneLODControllerRef;
  * NiBoneLODController - A LOD controller for bones?
  */
 
-class DLLEXPORT NiBoneLODController : public NI_BONE_L_O_D_CONTROLLER_PARENT {
+class NIFLIB_API NiBoneLODController : public NI_BONE_L_O_D_CONTROLLER_PARENT {
 public:
 	NiBoneLODController();
 	~NiBoneLODController();
diff --git a/obj/NiBoolData.h b/obj/NiBoolData.h
index d35c014a..2cfbd9a4 100644
--- a/obj/NiBoolData.h
+++ b/obj/NiBoolData.h
@@ -17,7 +17,7 @@ typedef Ref<NiBoolData> NiBoolDataRef;
  * NiBoolData - Timed boolean data.
  */
 
-class DLLEXPORT NiBoolData : public NI_BOOL_DATA_PARENT {
+class NIFLIB_API NiBoolData : public NI_BOOL_DATA_PARENT {
 public:
 	NiBoolData();
 	~NiBoolData();
diff --git a/obj/NiBoolInterpolator.h b/obj/NiBoolInterpolator.h
index 7e25b4fa..5ed6e7aa 100644
--- a/obj/NiBoolInterpolator.h
+++ b/obj/NiBoolInterpolator.h
@@ -19,7 +19,7 @@ typedef Ref<NiBoolInterpolator> NiBoolInterpolatorRef;
  * NiBoolInterpolator - Unknown.
  */
 
-class DLLEXPORT NiBoolInterpolator : public NI_BOOL_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBoolInterpolator : public NI_BOOL_INTERPOLATOR_PARENT {
 public:
 	NiBoolInterpolator();
 	~NiBoolInterpolator();
diff --git a/obj/NiBoolTimelineInterpolator.h b/obj/NiBoolTimelineInterpolator.h
index 2bd261ad..5941527c 100644
--- a/obj/NiBoolTimelineInterpolator.h
+++ b/obj/NiBoolTimelineInterpolator.h
@@ -19,7 +19,7 @@ typedef Ref<NiBoolTimelineInterpolator> NiBoolTimelineInterpolatorRef;
  * NiBoolTimelineInterpolator - Unknown.
  */
 
-class DLLEXPORT NiBoolTimelineInterpolator : public NI_BOOL_TIMELINE_INTERPOLATOR_PARENT {
+class NIFLIB_API NiBoolTimelineInterpolator : public NI_BOOL_TIMELINE_INTERPOLATOR_PARENT {
 public:
 	NiBoolTimelineInterpolator();
 	~NiBoolTimelineInterpolator();
diff --git a/obj/NiBooleanExtraData.h b/obj/NiBooleanExtraData.h
index 6d7dabcf..cbf8ea66 100644
--- a/obj/NiBooleanExtraData.h
+++ b/obj/NiBooleanExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiBooleanExtraData> NiBooleanExtraDataRef;
  * NiBooleanExtraData - Boolean extra data.
  */
 
-class DLLEXPORT NiBooleanExtraData : public NI_BOOLEAN_EXTRA_DATA_PARENT {
+class NIFLIB_API NiBooleanExtraData : public NI_BOOLEAN_EXTRA_DATA_PARENT {
 public:
 	NiBooleanExtraData();
 	~NiBooleanExtraData();
diff --git a/obj/NiCamera.h b/obj/NiCamera.h
index 25cfc419..88123378 100644
--- a/obj/NiCamera.h
+++ b/obj/NiCamera.h
@@ -19,7 +19,7 @@ typedef Ref<NiCamera> NiCameraRef;
  * NiCamera - Camera object.
  */
 
-class DLLEXPORT NiCamera : public NI_CAMERA_PARENT {
+class NIFLIB_API NiCamera : public NI_CAMERA_PARENT {
 public:
 	NiCamera();
 	~NiCamera();
diff --git a/obj/NiCollisionData.h b/obj/NiCollisionData.h
index af2eb546..07e9415f 100644
--- a/obj/NiCollisionData.h
+++ b/obj/NiCollisionData.h
@@ -19,7 +19,7 @@ typedef Ref<NiCollisionData> NiCollisionDataRef;
  * NiCollisionData - Collision box.
  */
 
-class DLLEXPORT NiCollisionData : public NI_COLLISION_DATA_PARENT {
+class NIFLIB_API NiCollisionData : public NI_COLLISION_DATA_PARENT {
 public:
 	NiCollisionData();
 	~NiCollisionData();
diff --git a/obj/NiCollisionObject.h b/obj/NiCollisionObject.h
index 6273fffe..c9a0fd3d 100644
--- a/obj/NiCollisionObject.h
+++ b/obj/NiCollisionObject.h
@@ -20,7 +20,7 @@ typedef Ref<NiCollisionObject> NiCollisionObjectRef;
  * NiCollisionObject - Unknown.
  */
 
-class DLLEXPORT NiCollisionObject : public NI_COLLISION_OBJECT_PARENT {
+class NIFLIB_API NiCollisionObject : public NI_COLLISION_OBJECT_PARENT {
 public:
 	NiCollisionObject();
 	~NiCollisionObject();
diff --git a/obj/NiColorData.h b/obj/NiColorData.h
index e6581e6d..b867818f 100644
--- a/obj/NiColorData.h
+++ b/obj/NiColorData.h
@@ -17,7 +17,7 @@ typedef Ref<NiColorData> NiColorDataRef;
  * NiColorData - Color data for material color controller.
  */
 
-class DLLEXPORT NiColorData : public NI_COLOR_DATA_PARENT {
+class NIFLIB_API NiColorData : public NI_COLOR_DATA_PARENT {
 public:
 	NiColorData();
 	~NiColorData();
diff --git a/obj/NiColorExtraData.h b/obj/NiColorExtraData.h
index fc31b56f..e8dbb6c9 100644
--- a/obj/NiColorExtraData.h
+++ b/obj/NiColorExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiColorExtraData> NiColorExtraDataRef;
  * NiColorExtraData - Unknown.
  */
 
-class DLLEXPORT NiColorExtraData : public NI_COLOR_EXTRA_DATA_PARENT {
+class NIFLIB_API NiColorExtraData : public NI_COLOR_EXTRA_DATA_PARENT {
 public:
 	NiColorExtraData();
 	~NiColorExtraData();
diff --git a/obj/NiControllerManager.h b/obj/NiControllerManager.h
index 3d8c1421..01639c09 100644
--- a/obj/NiControllerManager.h
+++ b/obj/NiControllerManager.h
@@ -20,7 +20,7 @@ typedef Ref<NiControllerManager> NiControllerManagerRef;
  * NiControllerManager - Unknown. Root of all controllers?
  */
 
-class DLLEXPORT NiControllerManager : public NI_CONTROLLER_MANAGER_PARENT {
+class NIFLIB_API NiControllerManager : public NI_CONTROLLER_MANAGER_PARENT {
 public:
 	NiControllerManager();
 	~NiControllerManager();
diff --git a/obj/NiControllerSequence.h b/obj/NiControllerSequence.h
index fea7d5b1..99fa7aec 100644
--- a/obj/NiControllerSequence.h
+++ b/obj/NiControllerSequence.h
@@ -24,7 +24,7 @@ typedef Ref<NiControllerSequence> NiControllerSequenceRef;
  * up).
  */
 
-class DLLEXPORT NiControllerSequence : public NI_CONTROLLER_SEQUENCE_PARENT {
+class NIFLIB_API NiControllerSequence : public NI_CONTROLLER_SEQUENCE_PARENT {
 public:
 	NiControllerSequence();
 	~NiControllerSequence();
diff --git a/obj/NiDefaultAVObjectPalette.h b/obj/NiDefaultAVObjectPalette.h
index 5f9d1c8e..1cc4a8e0 100644
--- a/obj/NiDefaultAVObjectPalette.h
+++ b/obj/NiDefaultAVObjectPalette.h
@@ -18,7 +18,7 @@ typedef Ref<NiDefaultAVObjectPalette> NiDefaultAVObjectPaletteRef;
  * by NiControllerManager.
  */
 
-class DLLEXPORT NiDefaultAVObjectPalette : public NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT {
+class NIFLIB_API NiDefaultAVObjectPalette : public NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT {
 public:
 	NiDefaultAVObjectPalette();
 	~NiDefaultAVObjectPalette();
diff --git a/obj/NiDirectionalLight.h b/obj/NiDirectionalLight.h
index 13097acf..08a3807b 100644
--- a/obj/NiDirectionalLight.h
+++ b/obj/NiDirectionalLight.h
@@ -15,7 +15,7 @@ typedef Ref<NiDirectionalLight> NiDirectionalLightRef;
  * NiDirectionalLight - Directional light source.
  */
 
-class DLLEXPORT NiDirectionalLight : public NI_DIRECTIONAL_LIGHT_PARENT {
+class NIFLIB_API NiDirectionalLight : public NI_DIRECTIONAL_LIGHT_PARENT {
 public:
 	NiDirectionalLight();
 	~NiDirectionalLight();
diff --git a/obj/NiDitherProperty.h b/obj/NiDitherProperty.h
index 0f4e07a6..98251087 100644
--- a/obj/NiDitherProperty.h
+++ b/obj/NiDitherProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiDitherProperty> NiDitherPropertyRef;
  * NiDitherProperty - Unknown.
  */
 
-class DLLEXPORT NiDitherProperty : public NI_DITHER_PROPERTY_PARENT {
+class NIFLIB_API NiDitherProperty : public NI_DITHER_PROPERTY_PARENT {
 public:
 	NiDitherProperty();
 	~NiDitherProperty();
diff --git a/obj/NiDynamicEffect.h b/obj/NiDynamicEffect.h
index 78478d42..f1e009cd 100644
--- a/obj/NiDynamicEffect.h
+++ b/obj/NiDynamicEffect.h
@@ -19,7 +19,7 @@ typedef Ref<NiDynamicEffect> NiDynamicEffectRef;
  * NiDynamicEffect - A dynamic effect such as a light or environment map.
  */
 
-class DLLEXPORT NiDynamicEffect : public NI_DYNAMIC_EFFECT_PARENT {
+class NIFLIB_API NiDynamicEffect : public NI_DYNAMIC_EFFECT_PARENT {
 public:
 	NiDynamicEffect();
 	~NiDynamicEffect();
diff --git a/obj/NiExtraData.h b/obj/NiExtraData.h
index 6360019a..811a3b74 100644
--- a/obj/NiExtraData.h
+++ b/obj/NiExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiExtraData> NiExtraDataRef;
  * NiExtraData - A generic extra data block.
  */
 
-class DLLEXPORT NiExtraData : public NI_EXTRA_DATA_PARENT {
+class NIFLIB_API NiExtraData : public NI_EXTRA_DATA_PARENT {
 public:
 	NiExtraData();
 	~NiExtraData();
diff --git a/obj/NiFlipController.h b/obj/NiFlipController.h
index 1c1b2e4b..10bc317a 100644
--- a/obj/NiFlipController.h
+++ b/obj/NiFlipController.h
@@ -19,7 +19,7 @@ typedef Ref<NiFlipController> NiFlipControllerRef;
  * NiFlipController - Texture flipping controller.
  */
 
-class DLLEXPORT NiFlipController : public NI_FLIP_CONTROLLER_PARENT {
+class NIFLIB_API NiFlipController : public NI_FLIP_CONTROLLER_PARENT {
 public:
 	NiFlipController();
 	~NiFlipController();
diff --git a/obj/NiFloatData.h b/obj/NiFloatData.h
index 106944ca..39ab0b72 100644
--- a/obj/NiFloatData.h
+++ b/obj/NiFloatData.h
@@ -17,7 +17,7 @@ typedef Ref<NiFloatData> NiFloatDataRef;
  * NiFloatData - Possibly the 1D position along a 3D path.
  */
 
-class DLLEXPORT NiFloatData : public NI_FLOAT_DATA_PARENT {
+class NIFLIB_API NiFloatData : public NI_FLOAT_DATA_PARENT {
 public:
 	NiFloatData();
 	~NiFloatData();
diff --git a/obj/NiFloatExtraData.h b/obj/NiFloatExtraData.h
index b7b5e50f..929c1e6f 100644
--- a/obj/NiFloatExtraData.h
+++ b/obj/NiFloatExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiFloatExtraData> NiFloatExtraDataRef;
  * NiFloatExtraData - Float extra data.
  */
 
-class DLLEXPORT NiFloatExtraData : public NI_FLOAT_EXTRA_DATA_PARENT {
+class NIFLIB_API NiFloatExtraData : public NI_FLOAT_EXTRA_DATA_PARENT {
 public:
 	NiFloatExtraData();
 	~NiFloatExtraData();
diff --git a/obj/NiFloatExtraDataController.h b/obj/NiFloatExtraDataController.h
index 049829f5..b0131f0c 100644
--- a/obj/NiFloatExtraDataController.h
+++ b/obj/NiFloatExtraDataController.h
@@ -19,7 +19,7 @@ typedef Ref<NiFloatExtraDataController> NiFloatExtraDataControllerRef;
  * NiFloatExtraDataController - Unknown.
  */
 
-class DLLEXPORT NiFloatExtraDataController : public NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT {
+class NIFLIB_API NiFloatExtraDataController : public NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT {
 public:
 	NiFloatExtraDataController();
 	~NiFloatExtraDataController();
diff --git a/obj/NiFloatInterpolator.h b/obj/NiFloatInterpolator.h
index 3661b711..d49f5d2a 100644
--- a/obj/NiFloatInterpolator.h
+++ b/obj/NiFloatInterpolator.h
@@ -19,7 +19,7 @@ typedef Ref<NiFloatInterpolator> NiFloatInterpolatorRef;
  * NiFloatInterpolator - Unknown.
  */
 
-class DLLEXPORT NiFloatInterpolator : public NI_FLOAT_INTERPOLATOR_PARENT {
+class NIFLIB_API NiFloatInterpolator : public NI_FLOAT_INTERPOLATOR_PARENT {
 public:
 	NiFloatInterpolator();
 	~NiFloatInterpolator();
diff --git a/obj/NiFloatsExtraData.h b/obj/NiFloatsExtraData.h
index f465471b..3217510b 100644
--- a/obj/NiFloatsExtraData.h
+++ b/obj/NiFloatsExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiFloatsExtraData> NiFloatsExtraDataRef;
  * NiFloatsExtraData - Unknown.
  */
 
-class DLLEXPORT NiFloatsExtraData : public NI_FLOATS_EXTRA_DATA_PARENT {
+class NIFLIB_API NiFloatsExtraData : public NI_FLOATS_EXTRA_DATA_PARENT {
 public:
 	NiFloatsExtraData();
 	~NiFloatsExtraData();
diff --git a/obj/NiFogProperty.h b/obj/NiFogProperty.h
index c31d48ed..c8739742 100644
--- a/obj/NiFogProperty.h
+++ b/obj/NiFogProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiFogProperty> NiFogPropertyRef;
  * NiFogProperty - Describes... fog?
  */
 
-class DLLEXPORT NiFogProperty : public NI_FOG_PROPERTY_PARENT {
+class NIFLIB_API NiFogProperty : public NI_FOG_PROPERTY_PARENT {
 public:
 	NiFogProperty();
 	~NiFogProperty();
diff --git a/obj/NiGeomMorpherController.h b/obj/NiGeomMorpherController.h
index c2e84fbf..ae870cef 100644
--- a/obj/NiGeomMorpherController.h
+++ b/obj/NiGeomMorpherController.h
@@ -20,7 +20,7 @@ typedef Ref<NiGeomMorpherController> NiGeomMorpherControllerRef;
  * NiGeomMorpherController - Time controller for geometry morphing.
  */
 
-class DLLEXPORT NiGeomMorpherController : public NI_GEOM_MORPHER_CONTROLLER_PARENT {
+class NIFLIB_API NiGeomMorpherController : public NI_GEOM_MORPHER_CONTROLLER_PARENT {
 public:
 	NiGeomMorpherController();
 	~NiGeomMorpherController();
diff --git a/obj/NiGravity.h b/obj/NiGravity.h
index ac558df0..7270cb50 100644
--- a/obj/NiGravity.h
+++ b/obj/NiGravity.h
@@ -16,7 +16,7 @@ typedef Ref<NiGravity> NiGravityRef;
  * particles.
  */
 
-class DLLEXPORT NiGravity : public NI_GRAVITY_PARENT {
+class NIFLIB_API NiGravity : public NI_GRAVITY_PARENT {
 public:
 	NiGravity();
 	~NiGravity();
diff --git a/obj/NiIntegerExtraData.h b/obj/NiIntegerExtraData.h
index 33712c92..f9bb8b29 100644
--- a/obj/NiIntegerExtraData.h
+++ b/obj/NiIntegerExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiIntegerExtraData> NiIntegerExtraDataRef;
  * NiIntegerExtraData - Extra integer data.
  */
 
-class DLLEXPORT NiIntegerExtraData : public NI_INTEGER_EXTRA_DATA_PARENT {
+class NIFLIB_API NiIntegerExtraData : public NI_INTEGER_EXTRA_DATA_PARENT {
 public:
 	NiIntegerExtraData();
 	~NiIntegerExtraData();
diff --git a/obj/NiIntegersExtraData.h b/obj/NiIntegersExtraData.h
index b5d95a97..e7a71c69 100644
--- a/obj/NiIntegersExtraData.h
+++ b/obj/NiIntegersExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiIntegersExtraData> NiIntegersExtraDataRef;
  * NiIntegersExtraData - Integers data.
  */
 
-class DLLEXPORT NiIntegersExtraData : public NI_INTEGERS_EXTRA_DATA_PARENT {
+class NIFLIB_API NiIntegersExtraData : public NI_INTEGERS_EXTRA_DATA_PARENT {
 public:
 	NiIntegersExtraData();
 	~NiIntegersExtraData();
diff --git a/obj/NiInterpolator.h b/obj/NiInterpolator.h
index f8b37131..8ca81c1d 100644
--- a/obj/NiInterpolator.h
+++ b/obj/NiInterpolator.h
@@ -15,7 +15,7 @@ typedef Ref<NiInterpolator> NiInterpolatorRef;
  * NiInterpolator - Interpolator blocks - function unknown.
  */
 
-class DLLEXPORT NiInterpolator : public NI_INTERPOLATOR_PARENT {
+class NIFLIB_API NiInterpolator : public NI_INTERPOLATOR_PARENT {
 public:
 	NiInterpolator();
 	~NiInterpolator();
diff --git a/obj/NiKeyframeController.h b/obj/NiKeyframeController.h
index 1a9e19c1..bb383930 100644
--- a/obj/NiKeyframeController.h
+++ b/obj/NiKeyframeController.h
@@ -20,7 +20,7 @@ typedef Ref<NiKeyframeController> NiKeyframeControllerRef;
  * frames.
  */
 
-class DLLEXPORT NiKeyframeController : public NI_KEYFRAME_CONTROLLER_PARENT {
+class NIFLIB_API NiKeyframeController : public NI_KEYFRAME_CONTROLLER_PARENT {
 public:
 	NiKeyframeController();
 	~NiKeyframeController();
diff --git a/obj/NiKeyframeData.h b/obj/NiKeyframeData.h
index a0c24436..dbef2654 100644
--- a/obj/NiKeyframeData.h
+++ b/obj/NiKeyframeData.h
@@ -17,7 +17,7 @@ typedef Ref<NiKeyframeData> NiKeyframeDataRef;
  * NiKeyframeData - Keyframes for mesh animation.
  */
 
-class DLLEXPORT NiKeyframeData : public NI_KEYFRAME_DATA_PARENT {
+class NIFLIB_API NiKeyframeData : public NI_KEYFRAME_DATA_PARENT {
 public:
 	NiKeyframeData();
 	~NiKeyframeData();
diff --git a/obj/NiLODNode.h b/obj/NiLODNode.h
index 3a4b75b2..58bb07e3 100644
--- a/obj/NiLODNode.h
+++ b/obj/NiLODNode.h
@@ -23,7 +23,7 @@ typedef Ref<NiLODNode> NiLODNodeRef;
  * distance.
  */
 
-class DLLEXPORT NiLODNode : public NI_L_O_D_NODE_PARENT {
+class NIFLIB_API NiLODNode : public NI_L_O_D_NODE_PARENT {
 public:
 	NiLODNode();
 	~NiLODNode();
diff --git a/obj/NiLight.h b/obj/NiLight.h
index c2b5d0bf..66b829f3 100644
--- a/obj/NiLight.h
+++ b/obj/NiLight.h
@@ -15,7 +15,7 @@ typedef Ref<NiLight> NiLightRef;
  * NiLight - Light source.
  */
 
-class DLLEXPORT NiLight : public NI_LIGHT_PARENT {
+class NIFLIB_API NiLight : public NI_LIGHT_PARENT {
 public:
 	NiLight();
 	~NiLight();
diff --git a/obj/NiLightColorController.h b/obj/NiLightColorController.h
index 46065e56..a9fb6410 100644
--- a/obj/NiLightColorController.h
+++ b/obj/NiLightColorController.h
@@ -20,7 +20,7 @@ typedef Ref<NiLightColorController> NiLightColorControllerRef;
  * NiLightColorController - Light color animation controller.
  */
 
-class DLLEXPORT NiLightColorController : public NI_LIGHT_COLOR_CONTROLLER_PARENT {
+class NIFLIB_API NiLightColorController : public NI_LIGHT_COLOR_CONTROLLER_PARENT {
 public:
 	NiLightColorController();
 	~NiLightColorController();
diff --git a/obj/NiLightDimmerController.h b/obj/NiLightDimmerController.h
index e7c5c66e..2ef9afe4 100644
--- a/obj/NiLightDimmerController.h
+++ b/obj/NiLightDimmerController.h
@@ -19,7 +19,7 @@ typedef Ref<NiLightDimmerController> NiLightDimmerControllerRef;
  * NiLightDimmerController - Unknown controller.
  */
 
-class DLLEXPORT NiLightDimmerController : public NI_LIGHT_DIMMER_CONTROLLER_PARENT {
+class NIFLIB_API NiLightDimmerController : public NI_LIGHT_DIMMER_CONTROLLER_PARENT {
 public:
 	NiLightDimmerController();
 	~NiLightDimmerController();
diff --git a/obj/NiLookAtController.h b/obj/NiLookAtController.h
index 335d811f..f080b74a 100644
--- a/obj/NiLookAtController.h
+++ b/obj/NiLookAtController.h
@@ -20,7 +20,7 @@ typedef Ref<NiLookAtController> NiLookAtControllerRef;
  * -3.4e+38.
  */
 
-class DLLEXPORT NiLookAtController : public NI_LOOK_AT_CONTROLLER_PARENT {
+class NIFLIB_API NiLookAtController : public NI_LOOK_AT_CONTROLLER_PARENT {
 public:
 	NiLookAtController();
 	~NiLookAtController();
diff --git a/obj/NiLookAtInterpolator.h b/obj/NiLookAtInterpolator.h
index 24f45cf4..e1ac64b2 100644
--- a/obj/NiLookAtInterpolator.h
+++ b/obj/NiLookAtInterpolator.h
@@ -21,7 +21,7 @@ typedef Ref<NiLookAtInterpolator> NiLookAtInterpolatorRef;
  * NiLookAtInterpolator - Unknown.
  */
 
-class DLLEXPORT NiLookAtInterpolator : public NI_LOOK_AT_INTERPOLATOR_PARENT {
+class NIFLIB_API NiLookAtInterpolator : public NI_LOOK_AT_INTERPOLATOR_PARENT {
 public:
 	NiLookAtInterpolator();
 	~NiLookAtInterpolator();
diff --git a/obj/NiMaterialColorController.h b/obj/NiMaterialColorController.h
index 8b512704..107f8259 100644
--- a/obj/NiMaterialColorController.h
+++ b/obj/NiMaterialColorController.h
@@ -19,7 +19,7 @@ typedef Ref<NiMaterialColorController> NiMaterialColorControllerRef;
  * NiMaterialColorController - Time controller for material color.
  */
 
-class DLLEXPORT NiMaterialColorController : public NI_MATERIAL_COLOR_CONTROLLER_PARENT {
+class NIFLIB_API NiMaterialColorController : public NI_MATERIAL_COLOR_CONTROLLER_PARENT {
 public:
 	NiMaterialColorController();
 	~NiMaterialColorController();
diff --git a/obj/NiMaterialProperty.h b/obj/NiMaterialProperty.h
index 45e8a28c..0706b211 100644
--- a/obj/NiMaterialProperty.h
+++ b/obj/NiMaterialProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiMaterialProperty> NiMaterialPropertyRef;
  * NiMaterialProperty - Describes the material shading properties.
  */
 
-class DLLEXPORT NiMaterialProperty : public NI_MATERIAL_PROPERTY_PARENT {
+class NIFLIB_API NiMaterialProperty : public NI_MATERIAL_PROPERTY_PARENT {
 public:
 	NiMaterialProperty();
 	~NiMaterialProperty();
diff --git a/obj/NiMeshPSysData.h b/obj/NiMeshPSysData.h
index 37ad6f6f..0ad936ee 100644
--- a/obj/NiMeshPSysData.h
+++ b/obj/NiMeshPSysData.h
@@ -20,7 +20,7 @@ typedef Ref<NiMeshPSysData> NiMeshPSysDataRef;
  * NiMeshPSysData - Particle meshes data.
  */
 
-class DLLEXPORT NiMeshPSysData : public NI_MESH_P_SYS_DATA_PARENT {
+class NIFLIB_API NiMeshPSysData : public NI_MESH_P_SYS_DATA_PARENT {
 public:
 	NiMeshPSysData();
 	~NiMeshPSysData();
diff --git a/obj/NiMeshParticleSystem.h b/obj/NiMeshParticleSystem.h
index ac30c2bd..be2e4694 100644
--- a/obj/NiMeshParticleSystem.h
+++ b/obj/NiMeshParticleSystem.h
@@ -15,7 +15,7 @@ typedef Ref<NiMeshParticleSystem> NiMeshParticleSystemRef;
  * NiMeshParticleSystem - Particle system.
  */
 
-class DLLEXPORT NiMeshParticleSystem : public NI_MESH_PARTICLE_SYSTEM_PARENT {
+class NIFLIB_API NiMeshParticleSystem : public NI_MESH_PARTICLE_SYSTEM_PARENT {
 public:
 	NiMeshParticleSystem();
 	~NiMeshParticleSystem();
diff --git a/obj/NiMorphData.h b/obj/NiMorphData.h
index 31c2687d..3f1395ab 100644
--- a/obj/NiMorphData.h
+++ b/obj/NiMorphData.h
@@ -17,7 +17,7 @@ typedef Ref<NiMorphData> NiMorphDataRef;
  * NiMorphData - Geometry morphing data.
  */
 
-class DLLEXPORT NiMorphData : public NI_MORPH_DATA_PARENT {
+class NIFLIB_API NiMorphData : public NI_MORPH_DATA_PARENT {
 public:
 	NiMorphData();
 	~NiMorphData();
diff --git a/obj/NiMultiTargetTransformController.h b/obj/NiMultiTargetTransformController.h
index 4faeadc8..ba762c29 100644
--- a/obj/NiMultiTargetTransformController.h
+++ b/obj/NiMultiTargetTransformController.h
@@ -19,7 +19,7 @@ typedef Ref<NiMultiTargetTransformController> NiMultiTargetTransformControllerRe
  * NiMultiTargetTransformController - Unknown.
  */
 
-class DLLEXPORT NiMultiTargetTransformController : public NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT {
+class NIFLIB_API NiMultiTargetTransformController : public NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT {
 public:
 	NiMultiTargetTransformController();
 	~NiMultiTargetTransformController();
diff --git a/obj/NiNode.h b/obj/NiNode.h
index afddc44a..4e436d73 100644
--- a/obj/NiNode.h
+++ b/obj/NiNode.h
@@ -21,7 +21,7 @@ typedef Ref<NiNode> NiNodeRef;
  * NiNode - Generic node block for grouping.
  */
 
-class DLLEXPORT NiNode : public NI_NODE_PARENT {
+class NIFLIB_API NiNode : public NI_NODE_PARENT {
 public:
 	NiNode();
 	~NiNode();
diff --git a/obj/NiObject.h b/obj/NiObject.h
index 2e51630c..104a4603 100644
--- a/obj/NiObject.h
+++ b/obj/NiObject.h
@@ -30,12 +30,12 @@ typedef Ref<NiObject> NiObjectRef;
 typedef Ref<NiObject> blk_ref; //Temporary to make old code compile
 typedef NiObject IBlock;
 
-class DLLEXPORT NiObject {
+class NiObject {
 public:
-	NiObject();
-	virtual ~NiObject();
+	NIFLIB_API NiObject();
+	NIFLIB_API virtual ~NiObject();
 	//Run-Time Type Information
-	static const Type TYPE;
+	NIFLIB_API static const Type TYPE;
 
 	/*!
 	 * Used to determine an object's type.  These type strings are the same as the class names of the blocks in the <a href = "http://niftools.sourceforge.net/docsys/">NIF File Format Browser</a>.
@@ -55,29 +55,29 @@ public:
 	 * 
 	 * \sa CreateBlock
 	 */
-	virtual const Type & GetType() const { return TYPE; };
+	NIFLIB_API virtual const Type & GetType() const { return TYPE; };
 
-	bool IsSameType( const Type & compare_to ) const;
-	bool IsSameType( const NiObject * object ) const;
-	bool IsDerivedType (const Type & compare_to ) const;
-	bool IsDerivedType( const NiObject * objct ) const;
+	NIFLIB_API bool IsSameType( const Type & compare_to ) const;
+	NIFLIB_API bool IsSameType( const NiObject * object ) const;
+	NIFLIB_API bool IsDerivedType (const Type & compare_to ) const;
+	NIFLIB_API bool IsDerivedType( const NiObject * objct ) const;
 
 	//Streaming Functions
-	virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {}
-	virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const {}
-	virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {}
+	NIFLIB_HIDDEN virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {}
+	NIFLIB_HIDDEN virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const {}
+	NIFLIB_HIDDEN virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {}
 
 	//Reference Counting
-	void AddRef(); //Should not be called directly
-	void SubtractRef(); //Should not be called directly
-	unsigned int GetNumRefs() { return _ref_count; }
+	NIFLIB_API void AddRef(); //Should not be called directly
+	NIFLIB_API void SubtractRef(); //Should not be called directly
+	NIFLIB_API unsigned int GetNumRefs() { return _ref_count; }
 
 	/*! Returns A new block that contains all the same data that this block does, but occupies a different part of memory.  The data stored in a NIF file varies from version to version.  Usually you are safe with the default option (the highest availiable version) but you may need to use an earlier version if you need to clone an obsolete piece of information.
 	 * \param version The version number to use in the memory streaming operation.  Default is the highest version availiable.
 	 * \return A cloned copy of this block as a new block.
 	 * \sa CreateBlock
 	 */
-	NiObjectRef Clone( unsigned int version = 0xFFFFFFFF );
+	NIFLIB_API NiObjectRef Clone( unsigned int version = 0xFFFFFFFF );
 
 	/*!
 	 * Summarizes the information contained in this block in English.
@@ -98,13 +98,13 @@ public:
 	 * 
 	 * \sa IAttr::asString, SetVerboseMode
 	 */
-	virtual string asString( bool verbose = false ) const;
+	NIFLIB_API virtual string asString( bool verbose = false ) const;
 
 	/*!
 	 * Formats a human readable string that includes the type of the object
 	 * \return A string in the form:  address(type)
 	 */
-	virtual string GetIDString();
+	NIFLIB_API virtual string GetIDString();
 
 	/*!
 	 * Used to retrieve all blocks that the current block is linked to through <i>all</i> attributes.
@@ -122,20 +122,20 @@ public:
 	 * attr_list = my_block.GetRefs()
 	 * \endcode
 	 */
-	virtual list<NiObjectRef> GetRefs() const;
+	NIFLIB_API virtual list<NiObjectRef> GetRefs() const;
 	
 	// Python Operator Overloads
-	string __str__() const {
+	NIFLIB_API string __str__() const {
 		return asString();
 	};
 
-	virtual void RemoveCrossRef( NiObject * block_to_remove );
+	NIFLIB_API virtual void RemoveCrossRef( NiObject * block_to_remove );
 
-	void IncCrossRef( NiObject * block );
-	void DecCrossRef( NiObject* block );
-	virtual void ReassignCrossRefs( const map<string,NiObjectRef> & name_map );
+	NIFLIB_API void IncCrossRef( NiObject * block );
+	NIFLIB_API void DecCrossRef( NiObject* block );
+	NIFLIB_API virtual void ReassignCrossRefs( const map<string,NiObjectRef> & name_map );
 	
-	static unsigned int NumObjectsInMemory();
+	NIFLIB_API static unsigned int NumObjectsInMemory();
 private:
 	unsigned int _ref_count;
 	list<NiObject*> _cross_refs;
diff --git a/obj/NiObjectNET.h b/obj/NiObjectNET.h
index 7264f553..133b65ac 100644
--- a/obj/NiObjectNET.h
+++ b/obj/NiObjectNET.h
@@ -20,7 +20,7 @@ class NiTimeController;
  */
 typedef Ref<NiObjectNET> NiObjectNETRef;
 
-class DLLEXPORT NiObjectNET : public NI_OBJECT_N_E_T_PARENT {
+class NIFLIB_API NiObjectNET : public NI_OBJECT_N_E_T_PARENT {
 public:
 	NiObjectNET();
 	~NiObjectNET();
diff --git a/obj/NiPSysAgeDeathModifier.h b/obj/NiPSysAgeDeathModifier.h
index 3791c990..cd2bb695 100644
--- a/obj/NiPSysAgeDeathModifier.h
+++ b/obj/NiPSysAgeDeathModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysAgeDeathModifier> NiPSysAgeDeathModifierRef;
  * NiPSysAgeDeathModifier - Unknown particle modifier.
  */
 
-class DLLEXPORT NiPSysAgeDeathModifier : public NI_P_SYS_AGE_DEATH_MODIFIER_PARENT {
+class NIFLIB_API NiPSysAgeDeathModifier : public NI_P_SYS_AGE_DEATH_MODIFIER_PARENT {
 public:
 	NiPSysAgeDeathModifier();
 	~NiPSysAgeDeathModifier();
diff --git a/obj/NiPSysBombModifier.h b/obj/NiPSysBombModifier.h
index 46535427..67af45a5 100644
--- a/obj/NiPSysBombModifier.h
+++ b/obj/NiPSysBombModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysBombModifier> NiPSysBombModifierRef;
  * NiPSysBombModifier - Unknown.
  */
 
-class DLLEXPORT NiPSysBombModifier : public NI_P_SYS_BOMB_MODIFIER_PARENT {
+class NIFLIB_API NiPSysBombModifier : public NI_P_SYS_BOMB_MODIFIER_PARENT {
 public:
 	NiPSysBombModifier();
 	~NiPSysBombModifier();
diff --git a/obj/NiPSysBoundUpdateModifier.h b/obj/NiPSysBoundUpdateModifier.h
index 306a940f..34543afe 100644
--- a/obj/NiPSysBoundUpdateModifier.h
+++ b/obj/NiPSysBoundUpdateModifier.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysBoundUpdateModifier> NiPSysBoundUpdateModifierRef;
  * NiPSysBoundUpdateModifier - Unknown particle system modifier.
  */
 
-class DLLEXPORT NiPSysBoundUpdateModifier : public NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT {
+class NIFLIB_API NiPSysBoundUpdateModifier : public NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT {
 public:
 	NiPSysBoundUpdateModifier();
 	~NiPSysBoundUpdateModifier();
diff --git a/obj/NiPSysBoxEmitter.h b/obj/NiPSysBoxEmitter.h
index a9482186..b28febf5 100644
--- a/obj/NiPSysBoxEmitter.h
+++ b/obj/NiPSysBoxEmitter.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysBoxEmitter> NiPSysBoxEmitterRef;
  * NiPSysBoxEmitter - Unknown particle modifier.
  */
 
-class DLLEXPORT NiPSysBoxEmitter : public NI_P_SYS_BOX_EMITTER_PARENT {
+class NIFLIB_API NiPSysBoxEmitter : public NI_P_SYS_BOX_EMITTER_PARENT {
 public:
 	NiPSysBoxEmitter();
 	~NiPSysBoxEmitter();
diff --git a/obj/NiPSysColliderManager.h b/obj/NiPSysColliderManager.h
index 31408aa0..53a28a0e 100644
--- a/obj/NiPSysColliderManager.h
+++ b/obj/NiPSysColliderManager.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysColliderManager> NiPSysColliderManagerRef;
  * NiPSysColliderManager - Unknown.
  */
 
-class DLLEXPORT NiPSysColliderManager : public NI_P_SYS_COLLIDER_MANAGER_PARENT {
+class NIFLIB_API NiPSysColliderManager : public NI_P_SYS_COLLIDER_MANAGER_PARENT {
 public:
 	NiPSysColliderManager();
 	~NiPSysColliderManager();
diff --git a/obj/NiPSysColorModifier.h b/obj/NiPSysColorModifier.h
index 9240f877..f3588d0e 100644
--- a/obj/NiPSysColorModifier.h
+++ b/obj/NiPSysColorModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysColorModifier> NiPSysColorModifierRef;
  * NiPSysColorModifier - Unknown particle modifier.
  */
 
-class DLLEXPORT NiPSysColorModifier : public NI_P_SYS_COLOR_MODIFIER_PARENT {
+class NIFLIB_API NiPSysColorModifier : public NI_P_SYS_COLOR_MODIFIER_PARENT {
 public:
 	NiPSysColorModifier();
 	~NiPSysColorModifier();
diff --git a/obj/NiPSysCylinderEmitter.h b/obj/NiPSysCylinderEmitter.h
index 48de90a9..9df7e4ab 100644
--- a/obj/NiPSysCylinderEmitter.h
+++ b/obj/NiPSysCylinderEmitter.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysCylinderEmitter> NiPSysCylinderEmitterRef;
  * NiPSysCylinderEmitter - Unknown.
  */
 
-class DLLEXPORT NiPSysCylinderEmitter : public NI_P_SYS_CYLINDER_EMITTER_PARENT {
+class NIFLIB_API NiPSysCylinderEmitter : public NI_P_SYS_CYLINDER_EMITTER_PARENT {
 public:
 	NiPSysCylinderEmitter();
 	~NiPSysCylinderEmitter();
diff --git a/obj/NiPSysData.h b/obj/NiPSysData.h
index 4f897897..7f4b9f37 100644
--- a/obj/NiPSysData.h
+++ b/obj/NiPSysData.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysData> NiPSysDataRef;
  * NiPSysData - Particle system data.
  */
 
-class DLLEXPORT NiPSysData : public NI_P_SYS_DATA_PARENT {
+class NIFLIB_API NiPSysData : public NI_P_SYS_DATA_PARENT {
 public:
 	NiPSysData();
 	~NiPSysData();
diff --git a/obj/NiPSysDragModifier.h b/obj/NiPSysDragModifier.h
index c2aefd12..7e4c0ff8 100644
--- a/obj/NiPSysDragModifier.h
+++ b/obj/NiPSysDragModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysDragModifier> NiPSysDragModifierRef;
  * NiPSysDragModifier - Unknown.
  */
 
-class DLLEXPORT NiPSysDragModifier : public NI_P_SYS_DRAG_MODIFIER_PARENT {
+class NIFLIB_API NiPSysDragModifier : public NI_P_SYS_DRAG_MODIFIER_PARENT {
 public:
 	NiPSysDragModifier();
 	~NiPSysDragModifier();
diff --git a/obj/NiPSysEmitter.h b/obj/NiPSysEmitter.h
index d51c7cd8..6d4b234a 100644
--- a/obj/NiPSysEmitter.h
+++ b/obj/NiPSysEmitter.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitter> NiPSysEmitterRef;
  * NiPSysEmitter - A particle emitter modifier?
  */
 
-class DLLEXPORT NiPSysEmitter : public NI_P_SYS_EMITTER_PARENT {
+class NIFLIB_API NiPSysEmitter : public NI_P_SYS_EMITTER_PARENT {
 public:
 	NiPSysEmitter();
 	~NiPSysEmitter();
diff --git a/obj/NiPSysEmitterCtlr.h b/obj/NiPSysEmitterCtlr.h
index b3e43a71..d989e489 100644
--- a/obj/NiPSysEmitterCtlr.h
+++ b/obj/NiPSysEmitterCtlr.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysEmitterCtlr> NiPSysEmitterCtlrRef;
  * NiPSysEmitterCtlr - Particle system emitter controller.
  */
 
-class DLLEXPORT NiPSysEmitterCtlr : public NI_P_SYS_EMITTER_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterCtlr : public NI_P_SYS_EMITTER_CTLR_PARENT {
 public:
 	NiPSysEmitterCtlr();
 	~NiPSysEmitterCtlr();
diff --git a/obj/NiPSysEmitterCtlrData.h b/obj/NiPSysEmitterCtlrData.h
index 1f7f54e8..360a9636 100644
--- a/obj/NiPSysEmitterCtlrData.h
+++ b/obj/NiPSysEmitterCtlrData.h
@@ -17,7 +17,7 @@ typedef Ref<NiPSysEmitterCtlrData> NiPSysEmitterCtlrDataRef;
  * NiPSysEmitterCtlrData - Particle system emitter controller data.
  */
 
-class DLLEXPORT NiPSysEmitterCtlrData : public NI_P_SYS_EMITTER_CTLR_DATA_PARENT {
+class NIFLIB_API NiPSysEmitterCtlrData : public NI_P_SYS_EMITTER_CTLR_DATA_PARENT {
 public:
 	NiPSysEmitterCtlrData();
 	~NiPSysEmitterCtlrData();
diff --git a/obj/NiPSysEmitterDeclinationCtlr.h b/obj/NiPSysEmitterDeclinationCtlr.h
index b62051a8..24724826 100644
--- a/obj/NiPSysEmitterDeclinationCtlr.h
+++ b/obj/NiPSysEmitterDeclinationCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitterDeclinationCtlr> NiPSysEmitterDeclinationCtlrRef;
  * NiPSysEmitterDeclinationCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysEmitterDeclinationCtlr : public NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterDeclinationCtlr : public NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT {
 public:
 	NiPSysEmitterDeclinationCtlr();
 	~NiPSysEmitterDeclinationCtlr();
diff --git a/obj/NiPSysEmitterDeclinationVarCtlr.h b/obj/NiPSysEmitterDeclinationVarCtlr.h
index bdb739e4..cfe590ad 100644
--- a/obj/NiPSysEmitterDeclinationVarCtlr.h
+++ b/obj/NiPSysEmitterDeclinationVarCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitterDeclinationVarCtlr> NiPSysEmitterDeclinationVarCtlrRef;
  * NiPSysEmitterDeclinationVarCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysEmitterDeclinationVarCtlr : public NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterDeclinationVarCtlr : public NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT {
 public:
 	NiPSysEmitterDeclinationVarCtlr();
 	~NiPSysEmitterDeclinationVarCtlr();
diff --git a/obj/NiPSysEmitterInitialRadiusCtlr.h b/obj/NiPSysEmitterInitialRadiusCtlr.h
index 1c635725..059f1e61 100644
--- a/obj/NiPSysEmitterInitialRadiusCtlr.h
+++ b/obj/NiPSysEmitterInitialRadiusCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitterInitialRadiusCtlr> NiPSysEmitterInitialRadiusCtlrRef;
  * NiPSysEmitterInitialRadiusCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysEmitterInitialRadiusCtlr : public NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterInitialRadiusCtlr : public NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT {
 public:
 	NiPSysEmitterInitialRadiusCtlr();
 	~NiPSysEmitterInitialRadiusCtlr();
diff --git a/obj/NiPSysEmitterLifeSpanCtlr.h b/obj/NiPSysEmitterLifeSpanCtlr.h
index 41e2376e..e5565ea6 100644
--- a/obj/NiPSysEmitterLifeSpanCtlr.h
+++ b/obj/NiPSysEmitterLifeSpanCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitterLifeSpanCtlr> NiPSysEmitterLifeSpanCtlrRef;
  * NiPSysEmitterLifeSpanCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysEmitterLifeSpanCtlr : public NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterLifeSpanCtlr : public NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT {
 public:
 	NiPSysEmitterLifeSpanCtlr();
 	~NiPSysEmitterLifeSpanCtlr();
diff --git a/obj/NiPSysEmitterSpeedCtlr.h b/obj/NiPSysEmitterSpeedCtlr.h
index a3eb6cae..ae4c3862 100644
--- a/obj/NiPSysEmitterSpeedCtlr.h
+++ b/obj/NiPSysEmitterSpeedCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysEmitterSpeedCtlr> NiPSysEmitterSpeedCtlrRef;
  * NiPSysEmitterSpeedCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysEmitterSpeedCtlr : public NI_P_SYS_EMITTER_SPEED_CTLR_PARENT {
+class NIFLIB_API NiPSysEmitterSpeedCtlr : public NI_P_SYS_EMITTER_SPEED_CTLR_PARENT {
 public:
 	NiPSysEmitterSpeedCtlr();
 	~NiPSysEmitterSpeedCtlr();
diff --git a/obj/NiPSysGravityModifier.h b/obj/NiPSysGravityModifier.h
index 54bcbbe5..41b803ad 100644
--- a/obj/NiPSysGravityModifier.h
+++ b/obj/NiPSysGravityModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysGravityModifier> NiPSysGravityModifierRef;
  * NiPSysGravityModifier - Unknown particle system modifier.
  */
 
-class DLLEXPORT NiPSysGravityModifier : public NI_P_SYS_GRAVITY_MODIFIER_PARENT {
+class NIFLIB_API NiPSysGravityModifier : public NI_P_SYS_GRAVITY_MODIFIER_PARENT {
 public:
 	NiPSysGravityModifier();
 	~NiPSysGravityModifier();
diff --git a/obj/NiPSysGravityStrengthCtlr.h b/obj/NiPSysGravityStrengthCtlr.h
index 3a8ef9f1..e832c7f8 100644
--- a/obj/NiPSysGravityStrengthCtlr.h
+++ b/obj/NiPSysGravityStrengthCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysGravityStrengthCtlr> NiPSysGravityStrengthCtlrRef;
  * NiPSysGravityStrengthCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysGravityStrengthCtlr : public NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT {
+class NIFLIB_API NiPSysGravityStrengthCtlr : public NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT {
 public:
 	NiPSysGravityStrengthCtlr();
 	~NiPSysGravityStrengthCtlr();
diff --git a/obj/NiPSysGrowFadeModifier.h b/obj/NiPSysGrowFadeModifier.h
index b0a05823..220b3c46 100644
--- a/obj/NiPSysGrowFadeModifier.h
+++ b/obj/NiPSysGrowFadeModifier.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysGrowFadeModifier> NiPSysGrowFadeModifierRef;
  * NiPSysGrowFadeModifier - Unknown particle system modifier.
  */
 
-class DLLEXPORT NiPSysGrowFadeModifier : public NI_P_SYS_GROW_FADE_MODIFIER_PARENT {
+class NIFLIB_API NiPSysGrowFadeModifier : public NI_P_SYS_GROW_FADE_MODIFIER_PARENT {
 public:
 	NiPSysGrowFadeModifier();
 	~NiPSysGrowFadeModifier();
diff --git a/obj/NiPSysMeshEmitter.h b/obj/NiPSysMeshEmitter.h
index 829818bb..fdcc8915 100644
--- a/obj/NiPSysMeshEmitter.h
+++ b/obj/NiPSysMeshEmitter.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysMeshEmitter> NiPSysMeshEmitterRef;
  * NiPSysMeshEmitter - Unknown.
  */
 
-class DLLEXPORT NiPSysMeshEmitter : public NI_P_SYS_MESH_EMITTER_PARENT {
+class NIFLIB_API NiPSysMeshEmitter : public NI_P_SYS_MESH_EMITTER_PARENT {
 public:
 	NiPSysMeshEmitter();
 	~NiPSysMeshEmitter();
diff --git a/obj/NiPSysMeshUpdateModifier.h b/obj/NiPSysMeshUpdateModifier.h
index 53a9f1c5..68313cba 100644
--- a/obj/NiPSysMeshUpdateModifier.h
+++ b/obj/NiPSysMeshUpdateModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysMeshUpdateModifier> NiPSysMeshUpdateModifierRef;
  * NiPSysMeshUpdateModifier - Unknown.
  */
 
-class DLLEXPORT NiPSysMeshUpdateModifier : public NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT {
+class NIFLIB_API NiPSysMeshUpdateModifier : public NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT {
 public:
 	NiPSysMeshUpdateModifier();
 	~NiPSysMeshUpdateModifier();
diff --git a/obj/NiPSysModifier.h b/obj/NiPSysModifier.h
index 73a3999c..5cd18ae0 100644
--- a/obj/NiPSysModifier.h
+++ b/obj/NiPSysModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysModifier> NiPSysModifierRef;
  * NiPSysModifier - Generic particle system modifier block.
  */
 
-class DLLEXPORT NiPSysModifier : public NI_P_SYS_MODIFIER_PARENT {
+class NIFLIB_API NiPSysModifier : public NI_P_SYS_MODIFIER_PARENT {
 public:
 	NiPSysModifier();
 	~NiPSysModifier();
diff --git a/obj/NiPSysModifierActiveCtlr.h b/obj/NiPSysModifierActiveCtlr.h
index 4806cff1..4f5b6313 100644
--- a/obj/NiPSysModifierActiveCtlr.h
+++ b/obj/NiPSysModifierActiveCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysModifierActiveCtlr> NiPSysModifierActiveCtlrRef;
  * NiPSysModifierActiveCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysModifierActiveCtlr : public NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT {
+class NIFLIB_API NiPSysModifierActiveCtlr : public NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT {
 public:
 	NiPSysModifierActiveCtlr();
 	~NiPSysModifierActiveCtlr();
diff --git a/obj/NiPSysPlanarCollider.h b/obj/NiPSysPlanarCollider.h
index bba91b73..f3122ee8 100644
--- a/obj/NiPSysPlanarCollider.h
+++ b/obj/NiPSysPlanarCollider.h
@@ -21,7 +21,7 @@ typedef Ref<NiPSysPlanarCollider> NiPSysPlanarColliderRef;
  * NiPSysPlanarCollider - Unknown.
  */
 
-class DLLEXPORT NiPSysPlanarCollider : public NI_P_SYS_PLANAR_COLLIDER_PARENT {
+class NIFLIB_API NiPSysPlanarCollider : public NI_P_SYS_PLANAR_COLLIDER_PARENT {
 public:
 	NiPSysPlanarCollider();
 	~NiPSysPlanarCollider();
diff --git a/obj/NiPSysPositionModifier.h b/obj/NiPSysPositionModifier.h
index 605b14e6..ae2f0ec3 100644
--- a/obj/NiPSysPositionModifier.h
+++ b/obj/NiPSysPositionModifier.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysPositionModifier> NiPSysPositionModifierRef;
  * NiPSysPositionModifier - Unknown particle system modifier.
  */
 
-class DLLEXPORT NiPSysPositionModifier : public NI_P_SYS_POSITION_MODIFIER_PARENT {
+class NIFLIB_API NiPSysPositionModifier : public NI_P_SYS_POSITION_MODIFIER_PARENT {
 public:
 	NiPSysPositionModifier();
 	~NiPSysPositionModifier();
diff --git a/obj/NiPSysResetOnLoopCtlr.h b/obj/NiPSysResetOnLoopCtlr.h
index b77e85fc..b2de68f2 100644
--- a/obj/NiPSysResetOnLoopCtlr.h
+++ b/obj/NiPSysResetOnLoopCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysResetOnLoopCtlr> NiPSysResetOnLoopCtlrRef;
  * NiPSysResetOnLoopCtlr - Unknown.
  */
 
-class DLLEXPORT NiPSysResetOnLoopCtlr : public NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT {
+class NIFLIB_API NiPSysResetOnLoopCtlr : public NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT {
 public:
 	NiPSysResetOnLoopCtlr();
 	~NiPSysResetOnLoopCtlr();
diff --git a/obj/NiPSysRotationModifier.h b/obj/NiPSysRotationModifier.h
index 2ec785cc..8aa68024 100644
--- a/obj/NiPSysRotationModifier.h
+++ b/obj/NiPSysRotationModifier.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysRotationModifier> NiPSysRotationModifierRef;
  * NiPSysRotationModifier - Unknown particle system modifier.
  */
 
-class DLLEXPORT NiPSysRotationModifier : public NI_P_SYS_ROTATION_MODIFIER_PARENT {
+class NIFLIB_API NiPSysRotationModifier : public NI_P_SYS_ROTATION_MODIFIER_PARENT {
 public:
 	NiPSysRotationModifier();
 	~NiPSysRotationModifier();
diff --git a/obj/NiPSysSpawnModifier.h b/obj/NiPSysSpawnModifier.h
index a0aa6976..0147da70 100644
--- a/obj/NiPSysSpawnModifier.h
+++ b/obj/NiPSysSpawnModifier.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysSpawnModifier> NiPSysSpawnModifierRef;
  * NiPSysSpawnModifier - Unknown particle modifier.
  */
 
-class DLLEXPORT NiPSysSpawnModifier : public NI_P_SYS_SPAWN_MODIFIER_PARENT {
+class NIFLIB_API NiPSysSpawnModifier : public NI_P_SYS_SPAWN_MODIFIER_PARENT {
 public:
 	NiPSysSpawnModifier();
 	~NiPSysSpawnModifier();
diff --git a/obj/NiPSysSphereEmitter.h b/obj/NiPSysSphereEmitter.h
index ed147334..235b98ea 100644
--- a/obj/NiPSysSphereEmitter.h
+++ b/obj/NiPSysSphereEmitter.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysSphereEmitter> NiPSysSphereEmitterRef;
  * NiPSysSphereEmitter - Unknown.
  */
 
-class DLLEXPORT NiPSysSphereEmitter : public NI_P_SYS_SPHERE_EMITTER_PARENT {
+class NIFLIB_API NiPSysSphereEmitter : public NI_P_SYS_SPHERE_EMITTER_PARENT {
 public:
 	NiPSysSphereEmitter();
 	~NiPSysSphereEmitter();
diff --git a/obj/NiPSysUpdateCtlr.h b/obj/NiPSysUpdateCtlr.h
index 90fe41f7..1f6b07f0 100644
--- a/obj/NiPSysUpdateCtlr.h
+++ b/obj/NiPSysUpdateCtlr.h
@@ -15,7 +15,7 @@ typedef Ref<NiPSysUpdateCtlr> NiPSysUpdateCtlrRef;
  * NiPSysUpdateCtlr - Particle system controller, used for ???.
  */
 
-class DLLEXPORT NiPSysUpdateCtlr : public NI_P_SYS_UPDATE_CTLR_PARENT {
+class NIFLIB_API NiPSysUpdateCtlr : public NI_P_SYS_UPDATE_CTLR_PARENT {
 public:
 	NiPSysUpdateCtlr();
 	~NiPSysUpdateCtlr();
diff --git a/obj/NiPSysVolumeEmitter.h b/obj/NiPSysVolumeEmitter.h
index e1e383b9..a8963f33 100644
--- a/obj/NiPSysVolumeEmitter.h
+++ b/obj/NiPSysVolumeEmitter.h
@@ -19,7 +19,7 @@ typedef Ref<NiPSysVolumeEmitter> NiPSysVolumeEmitterRef;
  * NiPSysVolumeEmitter - An emitter that emits meshes?
  */
 
-class DLLEXPORT NiPSysVolumeEmitter : public NI_P_SYS_VOLUME_EMITTER_PARENT {
+class NIFLIB_API NiPSysVolumeEmitter : public NI_P_SYS_VOLUME_EMITTER_PARENT {
 public:
 	NiPSysVolumeEmitter();
 	~NiPSysVolumeEmitter();
diff --git a/obj/NiPalette.h b/obj/NiPalette.h
index a82b954e..ecd59668 100644
--- a/obj/NiPalette.h
+++ b/obj/NiPalette.h
@@ -15,7 +15,7 @@ typedef Ref<NiPalette> NiPaletteRef;
  * NiPalette - A color palette.
  */
 
-class DLLEXPORT NiPalette : public NI_PALETTE_PARENT {
+class NIFLIB_API NiPalette : public NI_PALETTE_PARENT {
 public:
 	NiPalette();
 	~NiPalette();
diff --git a/obj/NiParticleBomb.h b/obj/NiParticleBomb.h
index 5ff48ad8..f2a041e5 100644
--- a/obj/NiParticleBomb.h
+++ b/obj/NiParticleBomb.h
@@ -15,7 +15,7 @@ typedef Ref<NiParticleBomb> NiParticleBombRef;
  * NiParticleBomb - A particle modifier.
  */
 
-class DLLEXPORT NiParticleBomb : public NI_PARTICLE_BOMB_PARENT {
+class NIFLIB_API NiParticleBomb : public NI_PARTICLE_BOMB_PARENT {
 public:
 	NiParticleBomb();
 	~NiParticleBomb();
diff --git a/obj/NiParticleColorModifier.h b/obj/NiParticleColorModifier.h
index 6810c0a3..3b30a012 100644
--- a/obj/NiParticleColorModifier.h
+++ b/obj/NiParticleColorModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiParticleColorModifier> NiParticleColorModifierRef;
  * NiParticleColorModifier - Unknown.
  */
 
-class DLLEXPORT NiParticleColorModifier : public NI_PARTICLE_COLOR_MODIFIER_PARENT {
+class NIFLIB_API NiParticleColorModifier : public NI_PARTICLE_COLOR_MODIFIER_PARENT {
 public:
 	NiParticleColorModifier();
 	~NiParticleColorModifier();
diff --git a/obj/NiParticleGrowFade.h b/obj/NiParticleGrowFade.h
index b6ab0996..004ddc53 100644
--- a/obj/NiParticleGrowFade.h
+++ b/obj/NiParticleGrowFade.h
@@ -18,7 +18,7 @@ typedef Ref<NiParticleGrowFade> NiParticleGrowFadeRef;
  * to zero size again at the end of their lifetime cycle.
  */
 
-class DLLEXPORT NiParticleGrowFade : public NI_PARTICLE_GROW_FADE_PARENT {
+class NIFLIB_API NiParticleGrowFade : public NI_PARTICLE_GROW_FADE_PARENT {
 public:
 	NiParticleGrowFade();
 	~NiParticleGrowFade();
diff --git a/obj/NiParticleMeshModifier.h b/obj/NiParticleMeshModifier.h
index 18821459..537c6de0 100644
--- a/obj/NiParticleMeshModifier.h
+++ b/obj/NiParticleMeshModifier.h
@@ -19,7 +19,7 @@ typedef Ref<NiParticleMeshModifier> NiParticleMeshModifierRef;
  * NiParticleMeshModifier - Unknown.
  */
 
-class DLLEXPORT NiParticleMeshModifier : public NI_PARTICLE_MESH_MODIFIER_PARENT {
+class NIFLIB_API NiParticleMeshModifier : public NI_PARTICLE_MESH_MODIFIER_PARENT {
 public:
 	NiParticleMeshModifier();
 	~NiParticleMeshModifier();
diff --git a/obj/NiParticleMeshes.h b/obj/NiParticleMeshes.h
index 9f095a49..af83c3c0 100644
--- a/obj/NiParticleMeshes.h
+++ b/obj/NiParticleMeshes.h
@@ -15,7 +15,7 @@ typedef Ref<NiParticleMeshes> NiParticleMeshesRef;
  * NiParticleMeshes - Mesh particle node?
  */
 
-class DLLEXPORT NiParticleMeshes : public NI_PARTICLE_MESHES_PARENT {
+class NIFLIB_API NiParticleMeshes : public NI_PARTICLE_MESHES_PARENT {
 public:
 	NiParticleMeshes();
 	~NiParticleMeshes();
diff --git a/obj/NiParticleMeshesData.h b/obj/NiParticleMeshesData.h
index dbacb8aa..3b6698e3 100644
--- a/obj/NiParticleMeshesData.h
+++ b/obj/NiParticleMeshesData.h
@@ -19,7 +19,7 @@ typedef Ref<NiParticleMeshesData> NiParticleMeshesDataRef;
  * NiParticleMeshesData - Particle meshes data.
  */
 
-class DLLEXPORT NiParticleMeshesData : public NI_PARTICLE_MESHES_DATA_PARENT {
+class NIFLIB_API NiParticleMeshesData : public NI_PARTICLE_MESHES_DATA_PARENT {
 public:
 	NiParticleMeshesData();
 	~NiParticleMeshesData();
diff --git a/obj/NiParticleRotation.h b/obj/NiParticleRotation.h
index f2ed832d..f2e753d2 100644
--- a/obj/NiParticleRotation.h
+++ b/obj/NiParticleRotation.h
@@ -15,7 +15,7 @@ typedef Ref<NiParticleRotation> NiParticleRotationRef;
  * NiParticleRotation - Unknown.
  */
 
-class DLLEXPORT NiParticleRotation : public NI_PARTICLE_ROTATION_PARENT {
+class NIFLIB_API NiParticleRotation : public NI_PARTICLE_ROTATION_PARENT {
 public:
 	NiParticleRotation();
 	~NiParticleRotation();
diff --git a/obj/NiParticleSystem.h b/obj/NiParticleSystem.h
index 45b8fc1b..3bde2cce 100644
--- a/obj/NiParticleSystem.h
+++ b/obj/NiParticleSystem.h
@@ -19,7 +19,7 @@ typedef Ref<NiParticleSystem> NiParticleSystemRef;
  * NiParticleSystem - A particle system.
  */
 
-class DLLEXPORT NiParticleSystem : public NI_PARTICLE_SYSTEM_PARENT {
+class NIFLIB_API NiParticleSystem : public NI_PARTICLE_SYSTEM_PARENT {
 public:
 	NiParticleSystem();
 	~NiParticleSystem();
diff --git a/obj/NiParticleSystemController.h b/obj/NiParticleSystemController.h
index 77688d1d..0a11c1b5 100644
--- a/obj/NiParticleSystemController.h
+++ b/obj/NiParticleSystemController.h
@@ -23,7 +23,7 @@ typedef Ref<NiParticleSystemController> NiParticleSystemControllerRef;
  * block.
  */
 
-class DLLEXPORT NiParticleSystemController : public NI_PARTICLE_SYSTEM_CONTROLLER_PARENT {
+class NIFLIB_API NiParticleSystemController : public NI_PARTICLE_SYSTEM_CONTROLLER_PARENT {
 public:
 	NiParticleSystemController();
 	~NiParticleSystemController();
diff --git a/obj/NiParticles.h b/obj/NiParticles.h
index 3fee9abc..d157a9f6 100644
--- a/obj/NiParticles.h
+++ b/obj/NiParticles.h
@@ -15,7 +15,7 @@ typedef Ref<NiParticles> NiParticlesRef;
  * NiParticles - Generic particle system node.
  */
 
-class DLLEXPORT NiParticles : public NI_PARTICLES_PARENT {
+class NIFLIB_API NiParticles : public NI_PARTICLES_PARENT {
 public:
 	NiParticles();
 	~NiParticles();
diff --git a/obj/NiParticlesData.h b/obj/NiParticlesData.h
index 03876e4f..6dec71d6 100644
--- a/obj/NiParticlesData.h
+++ b/obj/NiParticlesData.h
@@ -15,7 +15,7 @@ typedef Ref<NiParticlesData> NiParticlesDataRef;
  * NiParticlesData - Generic rotating particles data block.
  */
 
-class DLLEXPORT NiParticlesData : public NI_PARTICLES_DATA_PARENT {
+class NIFLIB_API NiParticlesData : public NI_PARTICLES_DATA_PARENT {
 public:
 	NiParticlesData();
 	~NiParticlesData();
diff --git a/obj/NiPathController.h b/obj/NiPathController.h
index f2ed153a..ef898b5c 100644
--- a/obj/NiPathController.h
+++ b/obj/NiPathController.h
@@ -20,7 +20,7 @@ typedef Ref<NiPathController> NiPathControllerRef;
  * NiPathController - Time controller for a path.
  */
 
-class DLLEXPORT NiPathController : public NI_PATH_CONTROLLER_PARENT {
+class NIFLIB_API NiPathController : public NI_PATH_CONTROLLER_PARENT {
 public:
 	NiPathController();
 	~NiPathController();
diff --git a/obj/NiPathInterpolator.h b/obj/NiPathInterpolator.h
index 93dbc86c..0c0a324b 100644
--- a/obj/NiPathInterpolator.h
+++ b/obj/NiPathInterpolator.h
@@ -20,7 +20,7 @@ typedef Ref<NiPathInterpolator> NiPathInterpolatorRef;
  * NiPathInterpolator - Unknown interpolator.
  */
 
-class DLLEXPORT NiPathInterpolator : public NI_PATH_INTERPOLATOR_PARENT {
+class NIFLIB_API NiPathInterpolator : public NI_PATH_INTERPOLATOR_PARENT {
 public:
 	NiPathInterpolator();
 	~NiPathInterpolator();
diff --git a/obj/NiPixelData.h b/obj/NiPixelData.h
index 8ea210e4..619c040b 100644
--- a/obj/NiPixelData.h
+++ b/obj/NiPixelData.h
@@ -22,7 +22,7 @@ typedef Ref<NiPixelData> NiPixelDataRef;
  * NiPixelData - A texture.
  */
 
-class DLLEXPORT NiPixelData : public NI_PIXEL_DATA_PARENT {
+class NIFLIB_API NiPixelData : public NI_PIXEL_DATA_PARENT {
 public:
 	NiPixelData();
 	~NiPixelData();
diff --git a/obj/NiPlanarCollider.h b/obj/NiPlanarCollider.h
index adebfb82..af22af45 100644
--- a/obj/NiPlanarCollider.h
+++ b/obj/NiPlanarCollider.h
@@ -15,7 +15,7 @@ typedef Ref<NiPlanarCollider> NiPlanarColliderRef;
  * NiPlanarCollider - Unknown.
  */
 
-class DLLEXPORT NiPlanarCollider : public NI_PLANAR_COLLIDER_PARENT {
+class NIFLIB_API NiPlanarCollider : public NI_PLANAR_COLLIDER_PARENT {
 public:
 	NiPlanarCollider();
 	~NiPlanarCollider();
diff --git a/obj/NiPoint3Interpolator.h b/obj/NiPoint3Interpolator.h
index 7474b907..f4dec7d3 100644
--- a/obj/NiPoint3Interpolator.h
+++ b/obj/NiPoint3Interpolator.h
@@ -19,7 +19,7 @@ typedef Ref<NiPoint3Interpolator> NiPoint3InterpolatorRef;
  * NiPoint3Interpolator - Unknown.
  */
 
-class DLLEXPORT NiPoint3Interpolator : public NI_POINT3_INTERPOLATOR_PARENT {
+class NIFLIB_API NiPoint3Interpolator : public NI_POINT3_INTERPOLATOR_PARENT {
 public:
 	NiPoint3Interpolator();
 	~NiPoint3Interpolator();
diff --git a/obj/NiPointLight.h b/obj/NiPointLight.h
index 5fce9ca5..67613623 100644
--- a/obj/NiPointLight.h
+++ b/obj/NiPointLight.h
@@ -15,7 +15,7 @@ typedef Ref<NiPointLight> NiPointLightRef;
  * NiPointLight - A point light.
  */
 
-class DLLEXPORT NiPointLight : public NI_POINT_LIGHT_PARENT {
+class NIFLIB_API NiPointLight : public NI_POINT_LIGHT_PARENT {
 public:
 	NiPointLight();
 	~NiPointLight();
diff --git a/obj/NiPosData.h b/obj/NiPosData.h
index a1c00aa1..b7d1e57c 100644
--- a/obj/NiPosData.h
+++ b/obj/NiPosData.h
@@ -17,7 +17,7 @@ typedef Ref<NiPosData> NiPosDataRef;
  * NiPosData - Position data.
  */
 
-class DLLEXPORT NiPosData : public NI_POS_DATA_PARENT {
+class NIFLIB_API NiPosData : public NI_POS_DATA_PARENT {
 public:
 	NiPosData();
 	~NiPosData();
diff --git a/obj/NiProperty.h b/obj/NiProperty.h
index 1d505ff3..3ddbbecd 100644
--- a/obj/NiProperty.h
+++ b/obj/NiProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiProperty> NiPropertyRef;
  * NiProperty - A generic property block.
  */
 
-class DLLEXPORT NiProperty : public NI_PROPERTY_PARENT {
+class NIFLIB_API NiProperty : public NI_PROPERTY_PARENT {
 public:
 	NiProperty();
 	~NiProperty();
diff --git a/obj/NiRangeLODData.h b/obj/NiRangeLODData.h
index 0d0900e7..857ad484 100644
--- a/obj/NiRangeLODData.h
+++ b/obj/NiRangeLODData.h
@@ -17,7 +17,7 @@ typedef Ref<NiRangeLODData> NiRangeLODDataRef;
  * NiRangeLODData - Describes levels of detail.
  */
 
-class DLLEXPORT NiRangeLODData : public NI_RANGE_L_O_D_DATA_PARENT {
+class NIFLIB_API NiRangeLODData : public NI_RANGE_L_O_D_DATA_PARENT {
 public:
 	NiRangeLODData();
 	~NiRangeLODData();
diff --git a/obj/NiRotatingParticles.h b/obj/NiRotatingParticles.h
index 5876ba3e..00c2e101 100644
--- a/obj/NiRotatingParticles.h
+++ b/obj/NiRotatingParticles.h
@@ -15,7 +15,7 @@ typedef Ref<NiRotatingParticles> NiRotatingParticlesRef;
  * NiRotatingParticles - Unknown.
  */
 
-class DLLEXPORT NiRotatingParticles : public NI_ROTATING_PARTICLES_PARENT {
+class NIFLIB_API NiRotatingParticles : public NI_ROTATING_PARTICLES_PARENT {
 public:
 	NiRotatingParticles();
 	~NiRotatingParticles();
diff --git a/obj/NiRotatingParticlesData.h b/obj/NiRotatingParticlesData.h
index dfefb67d..954e780c 100644
--- a/obj/NiRotatingParticlesData.h
+++ b/obj/NiRotatingParticlesData.h
@@ -15,7 +15,7 @@ typedef Ref<NiRotatingParticlesData> NiRotatingParticlesDataRef;
  * NiRotatingParticlesData - Rotating particles data block.
  */
 
-class DLLEXPORT NiRotatingParticlesData : public NI_ROTATING_PARTICLES_DATA_PARENT {
+class NIFLIB_API NiRotatingParticlesData : public NI_ROTATING_PARTICLES_DATA_PARENT {
 public:
 	NiRotatingParticlesData();
 	~NiRotatingParticlesData();
diff --git a/obj/NiScreenLODData.h b/obj/NiScreenLODData.h
index 98beeebb..cd3e367f 100644
--- a/obj/NiScreenLODData.h
+++ b/obj/NiScreenLODData.h
@@ -15,7 +15,7 @@ typedef Ref<NiScreenLODData> NiScreenLODDataRef;
  * NiScreenLODData - Unknown.
  */
 
-class DLLEXPORT NiScreenLODData : public NI_SCREEN_L_O_D_DATA_PARENT {
+class NIFLIB_API NiScreenLODData : public NI_SCREEN_L_O_D_DATA_PARENT {
 public:
 	NiScreenLODData();
 	~NiScreenLODData();
diff --git a/obj/NiSequenceStreamHelper.h b/obj/NiSequenceStreamHelper.h
index c9a54b5c..fbb19eb1 100644
--- a/obj/NiSequenceStreamHelper.h
+++ b/obj/NiSequenceStreamHelper.h
@@ -15,7 +15,7 @@ typedef Ref<NiSequenceStreamHelper> NiSequenceStreamHelperRef;
  * NiSequenceStreamHelper - Keyframe animation root node, in .kf files.
  */
 
-class DLLEXPORT NiSequenceStreamHelper : public NI_SEQUENCE_STREAM_HELPER_PARENT {
+class NIFLIB_API NiSequenceStreamHelper : public NI_SEQUENCE_STREAM_HELPER_PARENT {
 public:
 	NiSequenceStreamHelper();
 	~NiSequenceStreamHelper();
diff --git a/obj/NiShadeProperty.h b/obj/NiShadeProperty.h
index 71b71e20..e7b974b5 100644
--- a/obj/NiShadeProperty.h
+++ b/obj/NiShadeProperty.h
@@ -16,7 +16,7 @@ typedef Ref<NiShadeProperty> NiShadePropertyRef;
  * used on a shape.
  */
 
-class DLLEXPORT NiShadeProperty : public NI_SHADE_PROPERTY_PARENT {
+class NIFLIB_API NiShadeProperty : public NI_SHADE_PROPERTY_PARENT {
 public:
 	NiShadeProperty();
 	~NiShadeProperty();
diff --git a/obj/NiSingleInterpolatorController.h b/obj/NiSingleInterpolatorController.h
index 0cd19df4..96203536 100644
--- a/obj/NiSingleInterpolatorController.h
+++ b/obj/NiSingleInterpolatorController.h
@@ -20,7 +20,7 @@ typedef Ref<NiSingleInterpolatorController> NiSingleInterpolatorControllerRef;
  * interpolator.
  */
 
-class DLLEXPORT NiSingleInterpolatorController : public NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT {
+class NIFLIB_API NiSingleInterpolatorController : public NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT {
 public:
 	NiSingleInterpolatorController();
 	~NiSingleInterpolatorController();
diff --git a/obj/NiSkinData.h b/obj/NiSkinData.h
index 084f2575..c22a5812 100644
--- a/obj/NiSkinData.h
+++ b/obj/NiSkinData.h
@@ -21,7 +21,7 @@ typedef Ref<NiSkinData> NiSkinDataRef;
  * NiSkinData - Skinning data.
  */
 
-class DLLEXPORT NiSkinData : public NI_SKIN_DATA_PARENT {
+class NIFLIB_API NiSkinData : public NI_SKIN_DATA_PARENT {
 public:
 	NiSkinData();
 	~NiSkinData();
diff --git a/obj/NiSkinInstance.h b/obj/NiSkinInstance.h
index 516ffd90..bd795943 100644
--- a/obj/NiSkinInstance.h
+++ b/obj/NiSkinInstance.h
@@ -23,7 +23,7 @@ typedef Ref<NiSkinInstance> NiSkinInstanceRef;
  * NiSkinInstance - Skinning instance.
  */
 
-class DLLEXPORT NiSkinInstance : public NI_SKIN_INSTANCE_PARENT {
+class NIFLIB_API NiSkinInstance : public NI_SKIN_INSTANCE_PARENT {
 public:
 	NiSkinInstance();
 	~NiSkinInstance();
diff --git a/obj/NiSkinPartition.h b/obj/NiSkinPartition.h
index 3c38b015..86015c48 100644
--- a/obj/NiSkinPartition.h
+++ b/obj/NiSkinPartition.h
@@ -19,7 +19,7 @@ typedef Ref<NiSkinPartition> NiSkinPartitionRef;
  * influenced only by a limited and fixed number of bones.
  */
 
-class DLLEXPORT NiSkinPartition : public NI_SKIN_PARTITION_PARENT {
+class NIFLIB_API NiSkinPartition : public NI_SKIN_PARTITION_PARENT {
 public:
 	NiSkinPartition();
 	~NiSkinPartition();
diff --git a/obj/NiSourceTexture.h b/obj/NiSourceTexture.h
index 1a3387d2..e890233b 100644
--- a/obj/NiSourceTexture.h
+++ b/obj/NiSourceTexture.h
@@ -20,7 +20,7 @@ typedef Ref<NiSourceTexture> NiSourceTextureRef;
  * NiSourceTexture - Describes texture source and properties.
  */
 
-class DLLEXPORT NiSourceTexture : public NI_SOURCE_TEXTURE_PARENT {
+class NIFLIB_API NiSourceTexture : public NI_SOURCE_TEXTURE_PARENT {
 public:
 	NiSourceTexture();
 	~NiSourceTexture();
diff --git a/obj/NiSpecularProperty.h b/obj/NiSpecularProperty.h
index 98154374..fbb87b29 100644
--- a/obj/NiSpecularProperty.h
+++ b/obj/NiSpecularProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiSpecularProperty> NiSpecularPropertyRef;
  * NiSpecularProperty - Gives specularity to a shape. Flags 0x0001.
  */
 
-class DLLEXPORT NiSpecularProperty : public NI_SPECULAR_PROPERTY_PARENT {
+class NIFLIB_API NiSpecularProperty : public NI_SPECULAR_PROPERTY_PARENT {
 public:
 	NiSpecularProperty();
 	~NiSpecularProperty();
diff --git a/obj/NiSphericalCollider.h b/obj/NiSphericalCollider.h
index 4740722c..c64d5602 100644
--- a/obj/NiSphericalCollider.h
+++ b/obj/NiSphericalCollider.h
@@ -15,7 +15,7 @@ typedef Ref<NiSphericalCollider> NiSphericalColliderRef;
  * NiSphericalCollider - Unknown.
  */
 
-class DLLEXPORT NiSphericalCollider : public NI_SPHERICAL_COLLIDER_PARENT {
+class NIFLIB_API NiSphericalCollider : public NI_SPHERICAL_COLLIDER_PARENT {
 public:
 	NiSphericalCollider();
 	~NiSphericalCollider();
diff --git a/obj/NiSpotLight.h b/obj/NiSpotLight.h
index bfe54430..f2146645 100644
--- a/obj/NiSpotLight.h
+++ b/obj/NiSpotLight.h
@@ -15,7 +15,7 @@ typedef Ref<NiSpotLight> NiSpotLightRef;
  * NiSpotLight - A spot.
  */
 
-class DLLEXPORT NiSpotLight : public NI_SPOT_LIGHT_PARENT {
+class NIFLIB_API NiSpotLight : public NI_SPOT_LIGHT_PARENT {
 public:
 	NiSpotLight();
 	~NiSpotLight();
diff --git a/obj/NiStencilProperty.h b/obj/NiStencilProperty.h
index c27f3b7c..be57453c 100644
--- a/obj/NiStencilProperty.h
+++ b/obj/NiStencilProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiStencilProperty> NiStencilPropertyRef;
  * NiStencilProperty - Allows control of stencil testing.
  */
 
-class DLLEXPORT NiStencilProperty : public NI_STENCIL_PROPERTY_PARENT {
+class NIFLIB_API NiStencilProperty : public NI_STENCIL_PROPERTY_PARENT {
 public:
 	NiStencilProperty();
 	~NiStencilProperty();
diff --git a/obj/NiStringExtraData.h b/obj/NiStringExtraData.h
index 2e128f1d..6c99c274 100644
--- a/obj/NiStringExtraData.h
+++ b/obj/NiStringExtraData.h
@@ -17,7 +17,7 @@ typedef Ref<NiStringExtraData> NiStringExtraDataRef;
  * blocks (through their name) in animation .kf files.
  */
 
-class DLLEXPORT NiStringExtraData : public NI_STRING_EXTRA_DATA_PARENT {
+class NIFLIB_API NiStringExtraData : public NI_STRING_EXTRA_DATA_PARENT {
 public:
 	NiStringExtraData();
 	~NiStringExtraData();
diff --git a/obj/NiStringPalette.h b/obj/NiStringPalette.h
index c5e577b0..596d4727 100644
--- a/obj/NiStringPalette.h
+++ b/obj/NiStringPalette.h
@@ -19,7 +19,7 @@ typedef Ref<NiStringPalette> NiStringPaletteRef;
  * conjunction with NiControllerSequence.
  */
 
-class DLLEXPORT NiStringPalette : public NI_STRING_PALETTE_PARENT {
+class NIFLIB_API NiStringPalette : public NI_STRING_PALETTE_PARENT {
 public:
 	NiStringPalette();
 	~NiStringPalette();
diff --git a/obj/NiStringsExtraData.h b/obj/NiStringsExtraData.h
index 501f09ed..5e455e0f 100644
--- a/obj/NiStringsExtraData.h
+++ b/obj/NiStringsExtraData.h
@@ -16,7 +16,7 @@ typedef Ref<NiStringsExtraData> NiStringsExtraDataRef;
  * names.
  */
 
-class DLLEXPORT NiStringsExtraData : public NI_STRINGS_EXTRA_DATA_PARENT {
+class NIFLIB_API NiStringsExtraData : public NI_STRINGS_EXTRA_DATA_PARENT {
 public:
 	NiStringsExtraData();
 	~NiStringsExtraData();
diff --git a/obj/NiTextKeyExtraData.h b/obj/NiTextKeyExtraData.h
index f0c1e97a..c2c639f0 100644
--- a/obj/NiTextKeyExtraData.h
+++ b/obj/NiTextKeyExtraData.h
@@ -16,7 +16,7 @@ typedef Ref<NiTextKeyExtraData> NiTextKeyExtraDataRef;
  * sequences.
  */
 
-class DLLEXPORT NiTextKeyExtraData : public NI_TEXT_KEY_EXTRA_DATA_PARENT {
+class NIFLIB_API NiTextKeyExtraData : public NI_TEXT_KEY_EXTRA_DATA_PARENT {
 public:
 	NiTextKeyExtraData();
 	~NiTextKeyExtraData();
diff --git a/obj/NiTextureEffect.h b/obj/NiTextureEffect.h
index 9f6d3d37..787de922 100644
--- a/obj/NiTextureEffect.h
+++ b/obj/NiTextureEffect.h
@@ -22,7 +22,7 @@ typedef Ref<NiTextureEffect> NiTextureEffectRef;
  * bump map is ignored if no NiTextureEffect block is present).
  */
 
-class DLLEXPORT NiTextureEffect : public NI_TEXTURE_EFFECT_PARENT {
+class NIFLIB_API NiTextureEffect : public NI_TEXTURE_EFFECT_PARENT {
 public:
 	NiTextureEffect();
 	~NiTextureEffect();
diff --git a/obj/NiTextureTransformController.h b/obj/NiTextureTransformController.h
index 95479708..1a55a8d6 100644
--- a/obj/NiTextureTransformController.h
+++ b/obj/NiTextureTransformController.h
@@ -19,7 +19,7 @@ typedef Ref<NiTextureTransformController> NiTextureTransformControllerRef;
  * NiTextureTransformController - Texture transformation controller.
  */
 
-class DLLEXPORT NiTextureTransformController : public NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT {
+class NIFLIB_API NiTextureTransformController : public NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT {
 public:
 	NiTextureTransformController();
 	~NiTextureTransformController();
diff --git a/obj/NiTexturingProperty.cpp b/obj/NiTexturingProperty.cpp
index f10bb6e9..59f71092 100644
--- a/obj/NiTexturingProperty.cpp
+++ b/obj/NiTexturingProperty.cpp
@@ -100,6 +100,9 @@ TexDesc NiTexturingProperty::GetTexture( int n ) const {
 		case DECAL_1_MAP:
 			return decal1Texture;
 	};
+
+	//If we get here, an invalid texture was requested.
+	throw runtime_error("Invalid texture requested.");
 }
 
 TexDesc NiTexturingProperty::GetShaderTexture( int n ) const {
diff --git a/obj/NiTexturingProperty.h b/obj/NiTexturingProperty.h
index eec6e334..38cce00e 100644
--- a/obj/NiTexturingProperty.h
+++ b/obj/NiTexturingProperty.h
@@ -18,7 +18,7 @@ typedef Ref<NiTexturingProperty> NiTexturingPropertyRef;
  * NiTexturingProperty - Describes an object's textures.
  */
 
-class DLLEXPORT NiTexturingProperty : public NI_TEXTURING_PROPERTY_PARENT {
+class NIFLIB_API NiTexturingProperty : public NI_TEXTURING_PROPERTY_PARENT {
 public:
 	NiTexturingProperty();
 	~NiTexturingProperty();
diff --git a/obj/NiTimeController.h b/obj/NiTimeController.h
index e0b5f6ea..29b92e19 100644
--- a/obj/NiTimeController.h
+++ b/obj/NiTimeController.h
@@ -20,7 +20,7 @@ typedef Ref<NiTimeController> NiTimeControllerRef;
  * NiTimeController - A generic time controller block.
  */
 
-class DLLEXPORT NiTimeController : public NI_TIME_CONTROLLER_PARENT {
+class NIFLIB_API NiTimeController : public NI_TIME_CONTROLLER_PARENT {
 public:
 	NiTimeController();
 	~NiTimeController();
diff --git a/obj/NiTransformController.h b/obj/NiTransformController.h
index aa10a253..a340e1db 100644
--- a/obj/NiTransformController.h
+++ b/obj/NiTransformController.h
@@ -16,7 +16,7 @@ typedef Ref<NiTransformController> NiTransformControllerRef;
  * NiKeyframeController.
  */
 
-class DLLEXPORT NiTransformController : public NI_TRANSFORM_CONTROLLER_PARENT {
+class NIFLIB_API NiTransformController : public NI_TRANSFORM_CONTROLLER_PARENT {
 public:
 	NiTransformController();
 	~NiTransformController();
diff --git a/obj/NiTransformData.h b/obj/NiTransformData.h
index 0ebf784f..8944d412 100644
--- a/obj/NiTransformData.h
+++ b/obj/NiTransformData.h
@@ -15,7 +15,7 @@ typedef Ref<NiTransformData> NiTransformDataRef;
  * NiTransformData - Mesh animation keyframe data.
  */
 
-class DLLEXPORT NiTransformData : public NI_TRANSFORM_DATA_PARENT {
+class NIFLIB_API NiTransformData : public NI_TRANSFORM_DATA_PARENT {
 public:
 	NiTransformData();
 	~NiTransformData();
diff --git a/obj/NiTransformInterpolator.h b/obj/NiTransformInterpolator.h
index d2fff7f5..0b9d835a 100644
--- a/obj/NiTransformInterpolator.h
+++ b/obj/NiTransformInterpolator.h
@@ -19,7 +19,7 @@ typedef Ref<NiTransformInterpolator> NiTransformInterpolatorRef;
  * NiTransformInterpolator - Unknown.
  */
 
-class DLLEXPORT NiTransformInterpolator : public NI_TRANSFORM_INTERPOLATOR_PARENT {
+class NIFLIB_API NiTransformInterpolator : public NI_TRANSFORM_INTERPOLATOR_PARENT {
 public:
 	NiTransformInterpolator();
 	~NiTransformInterpolator();
diff --git a/obj/NiTriBasedGeom.h b/obj/NiTriBasedGeom.h
index c79f5a1a..626528d5 100644
--- a/obj/NiTriBasedGeom.h
+++ b/obj/NiTriBasedGeom.h
@@ -21,7 +21,7 @@ typedef Ref<NiTriBasedGeom> NiTriBasedGeomRef;
  * NiTriBasedGeom - Describes a mesh, built from triangles.
  */
 
-class DLLEXPORT NiTriBasedGeom : public NI_TRI_BASED_GEOM_PARENT {
+class NIFLIB_API NiTriBasedGeom : public NI_TRI_BASED_GEOM_PARENT {
 public:
 	NiTriBasedGeom();
 	~NiTriBasedGeom();
diff --git a/obj/NiTriBasedGeomData.h b/obj/NiTriBasedGeomData.h
index 73b63101..c6e65534 100644
--- a/obj/NiTriBasedGeomData.h
+++ b/obj/NiTriBasedGeomData.h
@@ -19,7 +19,7 @@ typedef Ref<NiTriBasedGeomData> NiTriBasedGeomDataRef;
  * NiTriBasedGeomData - Mesh data: vertices, vertex normals, etc.
  */
 
-class DLLEXPORT NiTriBasedGeomData : public NI_TRI_BASED_GEOM_DATA_PARENT {
+class NIFLIB_API NiTriBasedGeomData : public NI_TRI_BASED_GEOM_DATA_PARENT {
 public:
 	NiTriBasedGeomData();
 	~NiTriBasedGeomData();
diff --git a/obj/NiTriShape.h b/obj/NiTriShape.h
index 41901825..3d94aa81 100644
--- a/obj/NiTriShape.h
+++ b/obj/NiTriShape.h
@@ -15,7 +15,7 @@ typedef Ref<NiTriShape> NiTriShapeRef;
  * NiTriShape - A shape node that refers to singular triangle data.
  */
 
-class DLLEXPORT NiTriShape : public NI_TRI_SHAPE_PARENT {
+class NIFLIB_API NiTriShape : public NI_TRI_SHAPE_PARENT {
 public:
 	NiTriShape();
 	~NiTriShape();
diff --git a/obj/NiTriShapeData.h b/obj/NiTriShapeData.h
index 553ffdec..25c6ef1d 100644
--- a/obj/NiTriShapeData.h
+++ b/obj/NiTriShapeData.h
@@ -17,7 +17,7 @@ typedef Ref<NiTriShapeData> NiTriShapeDataRef;
  * NiTriShapeData - Holds mesh data using a list of singular triangles.
  */
 
-class DLLEXPORT NiTriShapeData : public NI_TRI_SHAPE_DATA_PARENT {
+class NIFLIB_API NiTriShapeData : public NI_TRI_SHAPE_DATA_PARENT {
 public:
 	NiTriShapeData();
 	~NiTriShapeData();
diff --git a/obj/NiTriStrips.h b/obj/NiTriStrips.h
index d467e54e..bf892a6a 100644
--- a/obj/NiTriStrips.h
+++ b/obj/NiTriStrips.h
@@ -16,7 +16,7 @@ typedef Ref<NiTriStrips> NiTriStripsRef;
  * of triangles
  */
 
-class DLLEXPORT NiTriStrips : public NI_TRI_STRIPS_PARENT {
+class NIFLIB_API NiTriStrips : public NI_TRI_STRIPS_PARENT {
 public:
 	NiTriStrips();
 	~NiTriStrips();
diff --git a/obj/NiTriStripsData.h b/obj/NiTriStripsData.h
index 23dadaf5..54770950 100644
--- a/obj/NiTriStripsData.h
+++ b/obj/NiTriStripsData.h
@@ -15,7 +15,7 @@ typedef Ref<NiTriStripsData> NiTriStripsDataRef;
  * NiTriStripsData - Holds mesh data using strips of triangles.
  */
 
-class DLLEXPORT NiTriStripsData : public NI_TRI_STRIPS_DATA_PARENT {
+class NIFLIB_API NiTriStripsData : public NI_TRI_STRIPS_DATA_PARENT {
 public:
 	NiTriStripsData();
 	~NiTriStripsData();
diff --git a/obj/NiUVController.h b/obj/NiUVController.h
index 7650ff50..14371bc8 100644
--- a/obj/NiUVController.h
+++ b/obj/NiUVController.h
@@ -19,7 +19,7 @@ typedef Ref<NiUVController> NiUVControllerRef;
  * NiUVController - Time controller for texture coordinates.
  */
 
-class DLLEXPORT NiUVController : public NI_U_V_CONTROLLER_PARENT {
+class NIFLIB_API NiUVController : public NI_U_V_CONTROLLER_PARENT {
 public:
 	NiUVController();
 	~NiUVController();
diff --git a/obj/NiUVData.h b/obj/NiUVData.h
index 5d4b288e..59d36250 100644
--- a/obj/NiUVData.h
+++ b/obj/NiUVData.h
@@ -17,7 +17,7 @@ typedef Ref<NiUVData> NiUVDataRef;
  * NiUVData - Texture coordinate data.
  */
 
-class DLLEXPORT NiUVData : public NI_U_V_DATA_PARENT {
+class NIFLIB_API NiUVData : public NI_U_V_DATA_PARENT {
 public:
 	NiUVData();
 	~NiUVData();
diff --git a/obj/NiVectorExtraData.h b/obj/NiVectorExtraData.h
index b5ade621..a0b5a7bf 100644
--- a/obj/NiVectorExtraData.h
+++ b/obj/NiVectorExtraData.h
@@ -15,7 +15,7 @@ typedef Ref<NiVectorExtraData> NiVectorExtraDataRef;
  * NiVectorExtraData - Extra vector data.
  */
 
-class DLLEXPORT NiVectorExtraData : public NI_VECTOR_EXTRA_DATA_PARENT {
+class NIFLIB_API NiVectorExtraData : public NI_VECTOR_EXTRA_DATA_PARENT {
 public:
 	NiVectorExtraData();
 	~NiVectorExtraData();
diff --git a/obj/NiVertWeightsExtraData.h b/obj/NiVertWeightsExtraData.h
index 5d08f1c9..75c10428 100644
--- a/obj/NiVertWeightsExtraData.h
+++ b/obj/NiVertWeightsExtraData.h
@@ -16,7 +16,7 @@ typedef Ref<NiVertWeightsExtraData> NiVertWeightsExtraDataRef;
  * for morphing animation or gravity.
  */
 
-class DLLEXPORT NiVertWeightsExtraData : public NI_VERT_WEIGHTS_EXTRA_DATA_PARENT {
+class NIFLIB_API NiVertWeightsExtraData : public NI_VERT_WEIGHTS_EXTRA_DATA_PARENT {
 public:
 	NiVertWeightsExtraData();
 	~NiVertWeightsExtraData();
diff --git a/obj/NiVertexColorProperty.h b/obj/NiVertexColorProperty.h
index 03449b32..82929309 100644
--- a/obj/NiVertexColorProperty.h
+++ b/obj/NiVertexColorProperty.h
@@ -18,7 +18,7 @@ typedef Ref<NiVertexColorProperty> NiVertexColorPropertyRef;
  * not present, vertex colors have vertex_mode=2 and lighting_mode=1.
  */
 
-class DLLEXPORT NiVertexColorProperty : public NI_VERTEX_COLOR_PROPERTY_PARENT {
+class NIFLIB_API NiVertexColorProperty : public NI_VERTEX_COLOR_PROPERTY_PARENT {
 public:
 	NiVertexColorProperty();
 	~NiVertexColorProperty();
diff --git a/obj/NiVisController.h b/obj/NiVisController.h
index 885953db..60fff803 100644
--- a/obj/NiVisController.h
+++ b/obj/NiVisController.h
@@ -19,7 +19,7 @@ typedef Ref<NiVisController> NiVisControllerRef;
  * NiVisController - Time controller for visibility.
  */
 
-class DLLEXPORT NiVisController : public NI_VIS_CONTROLLER_PARENT {
+class NIFLIB_API NiVisController : public NI_VIS_CONTROLLER_PARENT {
 public:
 	NiVisController();
 	~NiVisController();
diff --git a/obj/NiVisData.h b/obj/NiVisData.h
index 30353066..775fa4ef 100644
--- a/obj/NiVisData.h
+++ b/obj/NiVisData.h
@@ -15,7 +15,7 @@ typedef Ref<NiVisData> NiVisDataRef;
  * NiVisData - Visibility data for a controller.
  */
 
-class DLLEXPORT NiVisData : public NI_VIS_DATA_PARENT {
+class NIFLIB_API NiVisData : public NI_VIS_DATA_PARENT {
 public:
 	NiVisData();
 	~NiVisData();
diff --git a/obj/NiWireframeProperty.h b/obj/NiWireframeProperty.h
index 1e205c4f..24cddd96 100644
--- a/obj/NiWireframeProperty.h
+++ b/obj/NiWireframeProperty.h
@@ -15,7 +15,7 @@ typedef Ref<NiWireframeProperty> NiWireframePropertyRef;
  * NiWireframeProperty - Unknown.
  */
 
-class DLLEXPORT NiWireframeProperty : public NI_WIREFRAME_PROPERTY_PARENT {
+class NIFLIB_API NiWireframeProperty : public NI_WIREFRAME_PROPERTY_PARENT {
 public:
 	NiWireframeProperty();
 	~NiWireframeProperty();
diff --git a/obj/NiZBufferProperty.h b/obj/NiZBufferProperty.h
index bec73dde..801f6382 100644
--- a/obj/NiZBufferProperty.h
+++ b/obj/NiZBufferProperty.h
@@ -16,7 +16,7 @@ typedef Ref<NiZBufferProperty> NiZBufferPropertyRef;
  * depth buffer).
  */
 
-class DLLEXPORT NiZBufferProperty : public NI_Z_BUFFER_PROPERTY_PARENT {
+class NIFLIB_API NiZBufferProperty : public NI_Z_BUFFER_PROPERTY_PARENT {
 public:
 	NiZBufferProperty();
 	~NiZBufferProperty();
diff --git a/obj/RootCollisionNode.h b/obj/RootCollisionNode.h
index 47e208df..f6bb0c8d 100644
--- a/obj/RootCollisionNode.h
+++ b/obj/RootCollisionNode.h
@@ -15,7 +15,7 @@ typedef Ref<RootCollisionNode> RootCollisionNodeRef;
  * RootCollisionNode - Morrowind-specific node for collision mesh.
  */
 
-class DLLEXPORT RootCollisionNode : public ROOT_COLLISION_NODE_PARENT {
+class NIFLIB_API RootCollisionNode : public ROOT_COLLISION_NODE_PARENT {
 public:
 	RootCollisionNode();
 	~RootCollisionNode();
diff --git a/obj/bhkBlendCollisionObject.h b/obj/bhkBlendCollisionObject.h
index ad2ec806..9297c278 100644
--- a/obj/bhkBlendCollisionObject.h
+++ b/obj/bhkBlendCollisionObject.h
@@ -15,7 +15,7 @@ typedef Ref<bhkBlendCollisionObject> bhkBlendCollisionObjectRef;
  * bhkBlendCollisionObject - Unknown.
  */
 
-class DLLEXPORT bhkBlendCollisionObject : public BHK_BLEND_COLLISION_OBJECT_PARENT {
+class NIFLIB_API bhkBlendCollisionObject : public BHK_BLEND_COLLISION_OBJECT_PARENT {
 public:
 	bhkBlendCollisionObject();
 	~bhkBlendCollisionObject();
diff --git a/obj/bhkBlendController.h b/obj/bhkBlendController.h
index 20662134..0de4f18a 100644
--- a/obj/bhkBlendController.h
+++ b/obj/bhkBlendController.h
@@ -16,7 +16,7 @@ typedef Ref<bhkBlendController> bhkBlendControllerRef;
  * files.
  */
 
-class DLLEXPORT bhkBlendController : public BHK_BLEND_CONTROLLER_PARENT {
+class NIFLIB_API bhkBlendController : public BHK_BLEND_CONTROLLER_PARENT {
 public:
 	bhkBlendController();
 	~bhkBlendController();
diff --git a/obj/bhkBoxShape.h b/obj/bhkBoxShape.h
index 95d11651..71cc6d9f 100644
--- a/obj/bhkBoxShape.h
+++ b/obj/bhkBoxShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkBoxShape> bhkBoxShapeRef;
  * bhkBoxShape - A box.
  */
 
-class DLLEXPORT bhkBoxShape : public BHK_BOX_SHAPE_PARENT {
+class NIFLIB_API bhkBoxShape : public BHK_BOX_SHAPE_PARENT {
 public:
 	bhkBoxShape();
 	~bhkBoxShape();
diff --git a/obj/bhkCapsuleShape.h b/obj/bhkCapsuleShape.h
index 84d7bdac..0bb6689b 100644
--- a/obj/bhkCapsuleShape.h
+++ b/obj/bhkCapsuleShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkCapsuleShape> bhkCapsuleShapeRef;
  * bhkCapsuleShape - A capsule.
  */
 
-class DLLEXPORT bhkCapsuleShape : public BHK_CAPSULE_SHAPE_PARENT {
+class NIFLIB_API bhkCapsuleShape : public BHK_CAPSULE_SHAPE_PARENT {
 public:
 	bhkCapsuleShape();
 	~bhkCapsuleShape();
diff --git a/obj/bhkCollisionObject.h b/obj/bhkCollisionObject.h
index d695f9b5..37dbbd93 100644
--- a/obj/bhkCollisionObject.h
+++ b/obj/bhkCollisionObject.h
@@ -15,7 +15,7 @@ typedef Ref<bhkCollisionObject> bhkCollisionObjectRef;
  * bhkCollisionObject - Unknown.
  */
 
-class DLLEXPORT bhkCollisionObject : public BHK_COLLISION_OBJECT_PARENT {
+class NIFLIB_API bhkCollisionObject : public BHK_COLLISION_OBJECT_PARENT {
 public:
 	bhkCollisionObject();
 	~bhkCollisionObject();
diff --git a/obj/bhkConvexShape.h b/obj/bhkConvexShape.h
index 85c289da..aeb5e42d 100644
--- a/obj/bhkConvexShape.h
+++ b/obj/bhkConvexShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkConvexShape> bhkConvexShapeRef;
  * bhkConvexShape - A havok shape.
  */
 
-class DLLEXPORT bhkConvexShape : public BHK_CONVEX_SHAPE_PARENT {
+class NIFLIB_API bhkConvexShape : public BHK_CONVEX_SHAPE_PARENT {
 public:
 	bhkConvexShape();
 	~bhkConvexShape();
diff --git a/obj/bhkConvexTransformShape.h b/obj/bhkConvexTransformShape.h
index d8a9b8d5..2805616a 100644
--- a/obj/bhkConvexTransformShape.h
+++ b/obj/bhkConvexTransformShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkConvexTransformShape> bhkConvexTransformShapeRef;
  * bhkConvexTransformShape - A convex transformed shape?
  */
 
-class DLLEXPORT bhkConvexTransformShape : public BHK_CONVEX_TRANSFORM_SHAPE_PARENT {
+class NIFLIB_API bhkConvexTransformShape : public BHK_CONVEX_TRANSFORM_SHAPE_PARENT {
 public:
 	bhkConvexTransformShape();
 	~bhkConvexTransformShape();
diff --git a/obj/bhkConvexVerticesShape.h b/obj/bhkConvexVerticesShape.h
index 59af05df..8b87e9b6 100644
--- a/obj/bhkConvexVerticesShape.h
+++ b/obj/bhkConvexVerticesShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkConvexVerticesShape> bhkConvexVerticesShapeRef;
  * bhkConvexVerticesShape - A convex shape built from vertices?
  */
 
-class DLLEXPORT bhkConvexVerticesShape : public BHK_CONVEX_VERTICES_SHAPE_PARENT {
+class NIFLIB_API bhkConvexVerticesShape : public BHK_CONVEX_VERTICES_SHAPE_PARENT {
 public:
 	bhkConvexVerticesShape();
 	~bhkConvexVerticesShape();
diff --git a/obj/bhkEntity.h b/obj/bhkEntity.h
index 0ea449da..23e82db7 100644
--- a/obj/bhkEntity.h
+++ b/obj/bhkEntity.h
@@ -19,7 +19,7 @@ typedef Ref<bhkEntity> bhkEntityRef;
  * bhkEntity - A havok node, describes physical properties.
  */
 
-class DLLEXPORT bhkEntity : public BHK_ENTITY_PARENT {
+class NIFLIB_API bhkEntity : public BHK_ENTITY_PARENT {
 public:
 	bhkEntity();
 	~bhkEntity();
diff --git a/obj/bhkHingeConstraint.h b/obj/bhkHingeConstraint.h
index bd087f12..f365e224 100644
--- a/obj/bhkHingeConstraint.h
+++ b/obj/bhkHingeConstraint.h
@@ -15,7 +15,7 @@ typedef Ref<bhkHingeConstraint> bhkHingeConstraintRef;
  * bhkHingeConstraint - A hinge constraint.
  */
 
-class DLLEXPORT bhkHingeConstraint : public BHK_HINGE_CONSTRAINT_PARENT {
+class NIFLIB_API bhkHingeConstraint : public BHK_HINGE_CONSTRAINT_PARENT {
 public:
 	bhkHingeConstraint();
 	~bhkHingeConstraint();
diff --git a/obj/bhkLimitedHingeConstraint.h b/obj/bhkLimitedHingeConstraint.h
index 9c5990d6..c8c5fc23 100644
--- a/obj/bhkLimitedHingeConstraint.h
+++ b/obj/bhkLimitedHingeConstraint.h
@@ -17,7 +17,7 @@ typedef Ref<bhkLimitedHingeConstraint> bhkLimitedHingeConstraintRef;
  * bhkLimitedHingeConstraint - Hinge constraint.
  */
 
-class DLLEXPORT bhkLimitedHingeConstraint : public BHK_LIMITED_HINGE_CONSTRAINT_PARENT {
+class NIFLIB_API bhkLimitedHingeConstraint : public BHK_LIMITED_HINGE_CONSTRAINT_PARENT {
 public:
 	bhkLimitedHingeConstraint();
 	~bhkLimitedHingeConstraint();
diff --git a/obj/bhkListShape.h b/obj/bhkListShape.h
index b414b6c1..d98738f8 100644
--- a/obj/bhkListShape.h
+++ b/obj/bhkListShape.h
@@ -19,7 +19,7 @@ typedef Ref<bhkListShape> bhkListShapeRef;
  * bhkListShape - A list of shapes.
  */
 
-class DLLEXPORT bhkListShape : public BHK_LIST_SHAPE_PARENT {
+class NIFLIB_API bhkListShape : public BHK_LIST_SHAPE_PARENT {
 public:
 	bhkListShape();
 	~bhkListShape();
diff --git a/obj/bhkMalleableConstraint.h b/obj/bhkMalleableConstraint.h
index 453d8cf9..e6e96ff5 100644
--- a/obj/bhkMalleableConstraint.h
+++ b/obj/bhkMalleableConstraint.h
@@ -22,7 +22,7 @@ typedef Ref<bhkMalleableConstraint> bhkMalleableConstraintRef;
  * bhkMalleableConstraint - A malleable constraint.
  */
 
-class DLLEXPORT bhkMalleableConstraint : public BHK_MALLEABLE_CONSTRAINT_PARENT {
+class NIFLIB_API bhkMalleableConstraint : public BHK_MALLEABLE_CONSTRAINT_PARENT {
 public:
 	bhkMalleableConstraint();
 	~bhkMalleableConstraint();
diff --git a/obj/bhkMoppBvTreeShape.h b/obj/bhkMoppBvTreeShape.h
index a75376e6..61dd5744 100644
--- a/obj/bhkMoppBvTreeShape.h
+++ b/obj/bhkMoppBvTreeShape.h
@@ -20,7 +20,7 @@ typedef Ref<bhkMoppBvTreeShape> bhkMoppBvTreeShapeRef;
  * tree shape (not an entity).
  */
 
-class DLLEXPORT bhkMoppBvTreeShape : public BHK_MOPP_BV_TREE_SHAPE_PARENT {
+class NIFLIB_API bhkMoppBvTreeShape : public BHK_MOPP_BV_TREE_SHAPE_PARENT {
 public:
 	bhkMoppBvTreeShape();
 	~bhkMoppBvTreeShape();
diff --git a/obj/bhkMultiSphereShape.h b/obj/bhkMultiSphereShape.h
index 9f83f0d8..220da82e 100644
--- a/obj/bhkMultiSphereShape.h
+++ b/obj/bhkMultiSphereShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkMultiSphereShape> bhkMultiSphereShapeRef;
  * bhkMultiSphereShape - Unknown.
  */
 
-class DLLEXPORT bhkMultiSphereShape : public BHK_MULTI_SPHERE_SHAPE_PARENT {
+class NIFLIB_API bhkMultiSphereShape : public BHK_MULTI_SPHERE_SHAPE_PARENT {
 public:
 	bhkMultiSphereShape();
 	~bhkMultiSphereShape();
diff --git a/obj/bhkNiTriStripsShape.h b/obj/bhkNiTriStripsShape.h
index 91e37795..ce05e571 100644
--- a/obj/bhkNiTriStripsShape.h
+++ b/obj/bhkNiTriStripsShape.h
@@ -19,7 +19,7 @@ typedef Ref<bhkNiTriStripsShape> bhkNiTriStripsShapeRef;
  * bhkNiTriStripsShape - A shape constructed from a bunch of strips.
  */
 
-class DLLEXPORT bhkNiTriStripsShape : public BHK_NI_TRI_STRIPS_SHAPE_PARENT {
+class NIFLIB_API bhkNiTriStripsShape : public BHK_NI_TRI_STRIPS_SHAPE_PARENT {
 public:
 	bhkNiTriStripsShape();
 	~bhkNiTriStripsShape();
diff --git a/obj/bhkPackedNiTriStripsShape.h b/obj/bhkPackedNiTriStripsShape.h
index 30fcbb72..1bf0656a 100644
--- a/obj/bhkPackedNiTriStripsShape.h
+++ b/obj/bhkPackedNiTriStripsShape.h
@@ -19,7 +19,7 @@ typedef Ref<bhkPackedNiTriStripsShape> bhkPackedNiTriStripsShapeRef;
  * bhkPackedNiTriStripsShape - A shape constructed from strips data.
  */
 
-class DLLEXPORT bhkPackedNiTriStripsShape : public BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT {
+class NIFLIB_API bhkPackedNiTriStripsShape : public BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT {
 public:
 	bhkPackedNiTriStripsShape();
 	~bhkPackedNiTriStripsShape();
diff --git a/obj/bhkPrismaticConstraint.h b/obj/bhkPrismaticConstraint.h
index e37c9187..0d6af91f 100644
--- a/obj/bhkPrismaticConstraint.h
+++ b/obj/bhkPrismaticConstraint.h
@@ -15,7 +15,7 @@ typedef Ref<bhkPrismaticConstraint> bhkPrismaticConstraintRef;
  * bhkPrismaticConstraint - A prismatic constraint.
  */
 
-class DLLEXPORT bhkPrismaticConstraint : public BHK_PRISMATIC_CONSTRAINT_PARENT {
+class NIFLIB_API bhkPrismaticConstraint : public BHK_PRISMATIC_CONSTRAINT_PARENT {
 public:
 	bhkPrismaticConstraint();
 	~bhkPrismaticConstraint();
diff --git a/obj/bhkRagdollConstraint.h b/obj/bhkRagdollConstraint.h
index 31580a44..9c771e7f 100644
--- a/obj/bhkRagdollConstraint.h
+++ b/obj/bhkRagdollConstraint.h
@@ -15,7 +15,7 @@ typedef Ref<bhkRagdollConstraint> bhkRagdollConstraintRef;
  * bhkRagdollConstraint - Ragdoll constraint.
  */
 
-class DLLEXPORT bhkRagdollConstraint : public BHK_RAGDOLL_CONSTRAINT_PARENT {
+class NIFLIB_API bhkRagdollConstraint : public BHK_RAGDOLL_CONSTRAINT_PARENT {
 public:
 	bhkRagdollConstraint();
 	~bhkRagdollConstraint();
diff --git a/obj/bhkRefObject.h b/obj/bhkRefObject.h
index 358e8e2f..693590ae 100644
--- a/obj/bhkRefObject.h
+++ b/obj/bhkRefObject.h
@@ -15,7 +15,7 @@ typedef Ref<bhkRefObject> bhkRefObjectRef;
  * bhkRefObject - The base type of all Havok objects?
  */
 
-class DLLEXPORT bhkRefObject : public BHK_REF_OBJECT_PARENT {
+class NIFLIB_API bhkRefObject : public BHK_REF_OBJECT_PARENT {
 public:
 	bhkRefObject();
 	~bhkRefObject();
diff --git a/obj/bhkRigidBody.h b/obj/bhkRigidBody.h
index 138d5f82..4f44e693 100644
--- a/obj/bhkRigidBody.h
+++ b/obj/bhkRigidBody.h
@@ -21,7 +21,7 @@ typedef Ref<bhkRigidBody> bhkRigidBodyRef;
  * bhkRigidBody - Describes physical properties of an object.
  */
 
-class DLLEXPORT bhkRigidBody : public BHK_RIGID_BODY_PARENT {
+class NIFLIB_API bhkRigidBody : public BHK_RIGID_BODY_PARENT {
 public:
 	bhkRigidBody();
 	~bhkRigidBody();
diff --git a/obj/bhkRigidBodyT.h b/obj/bhkRigidBodyT.h
index 7f387aad..c6a0dc2f 100644
--- a/obj/bhkRigidBodyT.h
+++ b/obj/bhkRigidBodyT.h
@@ -15,7 +15,7 @@ typedef Ref<bhkRigidBodyT> bhkRigidBodyTRef;
  * bhkRigidBodyT - Unknown.
  */
 
-class DLLEXPORT bhkRigidBodyT : public BHK_RIGID_BODY_T_PARENT {
+class NIFLIB_API bhkRigidBodyT : public BHK_RIGID_BODY_T_PARENT {
 public:
 	bhkRigidBodyT();
 	~bhkRigidBodyT();
diff --git a/obj/bhkSPCollisionObject.h b/obj/bhkSPCollisionObject.h
index 63517915..c2526b01 100644
--- a/obj/bhkSPCollisionObject.h
+++ b/obj/bhkSPCollisionObject.h
@@ -15,7 +15,7 @@ typedef Ref<bhkSPCollisionObject> bhkSPCollisionObjectRef;
  * bhkSPCollisionObject - Unknown.
  */
 
-class DLLEXPORT bhkSPCollisionObject : public BHK_S_P_COLLISION_OBJECT_PARENT {
+class NIFLIB_API bhkSPCollisionObject : public BHK_S_P_COLLISION_OBJECT_PARENT {
 public:
 	bhkSPCollisionObject();
 	~bhkSPCollisionObject();
diff --git a/obj/bhkSerializable.h b/obj/bhkSerializable.h
index 159ed04f..8de40850 100644
--- a/obj/bhkSerializable.h
+++ b/obj/bhkSerializable.h
@@ -16,7 +16,7 @@ typedef Ref<bhkSerializable> bhkSerializableRef;
  * disk?
  */
 
-class DLLEXPORT bhkSerializable : public BHK_SERIALIZABLE_PARENT {
+class NIFLIB_API bhkSerializable : public BHK_SERIALIZABLE_PARENT {
 public:
 	bhkSerializable();
 	~bhkSerializable();
diff --git a/obj/bhkShape.h b/obj/bhkShape.h
index d66cd7a5..a1502a44 100644
--- a/obj/bhkShape.h
+++ b/obj/bhkShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkShape> bhkShapeRef;
  * bhkShape - A Havok Shape?
  */
 
-class DLLEXPORT bhkShape : public BHK_SHAPE_PARENT {
+class NIFLIB_API bhkShape : public BHK_SHAPE_PARENT {
 public:
 	bhkShape();
 	~bhkShape();
diff --git a/obj/bhkSimpleShapePhantom.h b/obj/bhkSimpleShapePhantom.h
index 79c62687..db980c1a 100644
--- a/obj/bhkSimpleShapePhantom.h
+++ b/obj/bhkSimpleShapePhantom.h
@@ -15,7 +15,7 @@ typedef Ref<bhkSimpleShapePhantom> bhkSimpleShapePhantomRef;
  * bhkSimpleShapePhantom - Unknown shape.
  */
 
-class DLLEXPORT bhkSimpleShapePhantom : public BHK_SIMPLE_SHAPE_PHANTOM_PARENT {
+class NIFLIB_API bhkSimpleShapePhantom : public BHK_SIMPLE_SHAPE_PHANTOM_PARENT {
 public:
 	bhkSimpleShapePhantom();
 	~bhkSimpleShapePhantom();
diff --git a/obj/bhkSphereRepShape.h b/obj/bhkSphereRepShape.h
index db4a9d11..bf975964 100644
--- a/obj/bhkSphereRepShape.h
+++ b/obj/bhkSphereRepShape.h
@@ -16,7 +16,7 @@ typedef Ref<bhkSphereRepShape> bhkSphereRepShapeRef;
  * quick rejection in addition to more detailed shape data?
  */
 
-class DLLEXPORT bhkSphereRepShape : public BHK_SPHERE_REP_SHAPE_PARENT {
+class NIFLIB_API bhkSphereRepShape : public BHK_SPHERE_REP_SHAPE_PARENT {
 public:
 	bhkSphereRepShape();
 	~bhkSphereRepShape();
diff --git a/obj/bhkSphereShape.h b/obj/bhkSphereShape.h
index 734fc8a2..90de85fd 100644
--- a/obj/bhkSphereShape.h
+++ b/obj/bhkSphereShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkSphereShape> bhkSphereShapeRef;
  * bhkSphereShape - A sphere.
  */
 
-class DLLEXPORT bhkSphereShape : public BHK_SPHERE_SHAPE_PARENT {
+class NIFLIB_API bhkSphereShape : public BHK_SPHERE_SHAPE_PARENT {
 public:
 	bhkSphereShape();
 	~bhkSphereShape();
diff --git a/obj/bhkStiffSpringConstraint.h b/obj/bhkStiffSpringConstraint.h
index 263119a5..1b126431 100644
--- a/obj/bhkStiffSpringConstraint.h
+++ b/obj/bhkStiffSpringConstraint.h
@@ -15,7 +15,7 @@ typedef Ref<bhkStiffSpringConstraint> bhkStiffSpringConstraintRef;
  * bhkStiffSpringConstraint - A spring constraint.
  */
 
-class DLLEXPORT bhkStiffSpringConstraint : public BHK_STIFF_SPRING_CONSTRAINT_PARENT {
+class NIFLIB_API bhkStiffSpringConstraint : public BHK_STIFF_SPRING_CONSTRAINT_PARENT {
 public:
 	bhkStiffSpringConstraint();
 	~bhkStiffSpringConstraint();
diff --git a/obj/bhkTransformShape.h b/obj/bhkTransformShape.h
index 770b198c..aa53ab78 100644
--- a/obj/bhkTransformShape.h
+++ b/obj/bhkTransformShape.h
@@ -15,7 +15,7 @@ typedef Ref<bhkTransformShape> bhkTransformShapeRef;
  * bhkTransformShape - Transforms a shape.
  */
 
-class DLLEXPORT bhkTransformShape : public BHK_TRANSFORM_SHAPE_PARENT {
+class NIFLIB_API bhkTransformShape : public BHK_TRANSFORM_SHAPE_PARENT {
 public:
 	bhkTransformShape();
 	~bhkTransformShape();
diff --git a/obj/bhkWorldObject.h b/obj/bhkWorldObject.h
index a160b2e9..5845cf3a 100644
--- a/obj/bhkWorldObject.h
+++ b/obj/bhkWorldObject.h
@@ -15,7 +15,7 @@ typedef Ref<bhkWorldObject> bhkWorldObjectRef;
  * bhkWorldObject - Havok objects that have a position in the world?
  */
 
-class DLLEXPORT bhkWorldObject : public BHK_WORLD_OBJECT_PARENT {
+class NIFLIB_API bhkWorldObject : public BHK_WORLD_OBJECT_PARENT {
 public:
 	bhkWorldObject();
 	~bhkWorldObject();
diff --git a/obj/hkPackedNiTriStripsData.h b/obj/hkPackedNiTriStripsData.h
index efa3f05b..359b6062 100644
--- a/obj/hkPackedNiTriStripsData.h
+++ b/obj/hkPackedNiTriStripsData.h
@@ -17,7 +17,7 @@ typedef Ref<hkPackedNiTriStripsData> hkPackedNiTriStripsDataRef;
  * hkPackedNiTriStripsData - NiTriStripsData for havok data?
  */
 
-class DLLEXPORT hkPackedNiTriStripsData : public HK_PACKED_NI_TRI_STRIPS_DATA_PARENT {
+class NIFLIB_API hkPackedNiTriStripsData : public HK_PACKED_NI_TRI_STRIPS_DATA_PARENT {
 public:
 	hkPackedNiTriStripsData();
 	~hkPackedNiTriStripsData();
diff --git a/py_niflib.vcproj b/py_niflib.vcproj
index fe08a8b5..3efcb9db 100644
--- a/py_niflib.vcproj
+++ b/py_niflib.vcproj
@@ -248,10 +248,88 @@
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
+		<Configuration
+			Name="Release - DLL|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="0"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="niflib.lib"
+				OutputFile="../bin/_niflib.dll"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
 	</Configurations>
 	<References>
 		<ProjectReference
 			ReferencedProjectIdentifier="{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}"
+			RelativePathToProject=".\niflib.vcproj"
 		/>
 	</References>
 	<Files>
@@ -301,6 +379,17 @@
 						Outputs="py_wrap.cpp"
 					/>
 				</FileConfiguration>
+				<FileConfiguration
+					Name="Release - DLL|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Running SWIG..."
+						CommandLine="swig -c++ -python -outdir &quot;..\bin&quot; -o py_wrap.cpp pyniflib.i&#x0D;&#x0A;"
+						AdditionalDependencies="niflib.h"
+						Outputs="py_wrap.cpp"
+					/>
+				</FileConfiguration>
 			</File>
 		</Filter>
 	</Files>
-- 
GitLab